| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
Noob NeeD Hep AgaiN
Now that I finished my program, My friend wants to use it on his computer but when I give him my released version it errors on his cpu. So I gave him the whole project folder and its still Saying that you might need to reinstall??
I can use it fine without no installation on my computer. Would I have to write some type of install program in order for another cpu to use it. It is not a very large program by no means, the only included files are iostream, process.h, and stdio.h, and its only about 30 lines long. I use Visual Studio 2005, Windows XP, I created a Win32- console app. written in C++. Its fully functional on my computer!!! What do I gotta do nextLast edited by Geo.Garnett : July 13th, 2005 at 01:08 AM. Reason: adding an additional explanation of my question |
|
#2
|
|||
|
|||
|
Did you build it in Release or Debug mode? If you built it in Debug mode then switch it to Release and rebuild it.
|
|
#3
|
||||
|
||||
|
Ya I built it in both, but the final copy I built it as release. The weird thing is, is that I can use this program on a networked computer in my home, without having to do anything I just put the .exe file on that computer and it works.
|
|
#4
|
||||
|
||||
|
So the program only doesn't work on your friend's PC?
What OS does he have, and what errors are being generated?
__________________
Officially a member of the Itsacon fan club. Beer blasts are every friday at Viper_SB's house. I bring the chips. ![]() |
|
#5
|
||||
|
||||
|
well he runs the same os as me which is windows xp, and the error says " This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem." and it shows my file direction(or path) on the top of the error log. --C:\Doc & settings\blah blah\ RFmenu.exe-- !!not his!!
when I compile the program, I have it set to the default settings, but I changed it from debug to release. Then I gave him the whole folder. |
|
#6
|
||||
|
||||
|
This is the program where you run another program from it, right? It sounds like when you provide the path in your code it's not valid on your friends machine....
Oh, you know what I bet it is? Are you using C:\Documents and Settings\YOUR_USERNAME\... ? If so, then it's the "username" part of the path that's the problem, because his Windows username and your's probably aren't the same That may also be why it works on your other computer(s), because you have the same login name there.... |
|
#7
|
||||
|
||||
|
Ya, I tried to be smart and fix that earlier by changing the saving direction to C:\HIS_USERNAME\-- LOL -- it still came out messed up.
Do you have any suggestions in how to fix or can it be... |
|
#8
|
||||
|
||||
|
I'd recommend doing something like this:
- Create string1 and give it the value "C:\\documents and settings\\" - Create a second char array and use getenv() (or something similar, I can't find it in my notes atm) to fill it with the Windows environment "%username%".... - Combine these two strings, so that now you have the full path of the username.... |
|
#9
|
||||
|
||||
|
so it should look something like this B-Con?
Code:
string path= "C:\\Documents and Settings\\"; string username; char array[] = "%username%"; I tested it out and it compiles but I haven't tried it with the whole program itself. But now I got two questions for you?? 1. Does it matter if I declare this out of the main(void)or should I make it in its own or just leave it declared before the main? 2. How does the string "Path" link to the array "username"? This is assuming what I wrote is correct if it is not what you were thinking then I will just keep trying. I should probably be doing my Latin Culture Assignment But this is far more interesting than ancient civilization in some country I have never been too and will probably never go too either!!!!! ![]() |
|
#10
|
||||
|
||||
|
Sorry, I was vague in what I said. Use the getenv() function to return a character pointer to the username. For example, create a string with the "c:\d and s" part, then copy onto the end of that the string returned by getenv(), which will contain the username:
Code:
char path[255]={"C:\\Documents and Settings\\"};
strcpy(&path[26],getenv("username"));
"path" will now have the full path with the username (it won't have a trailing backslash, though, so you'll hae to add that in order to use any filenames on the end or anything.... |
|
#11
|
|||
|
|||
|
Well, given that you both are using Windows XP and assuming that you both have access to the C: driver, why not have it in a common folder on both machines like "C:\RFmenu"?
------- Programming (Assignment/Project) Help |
|
#12
|
||||
|
||||
|
good idea prog, I just tried that. It still errors saying the configuration is off. So I messed with the settings in the Program Properties area, hoping that I might be able to fix it by accident, lol, but still nothing. Thanks for the idea. I appreciate both of yalls help
I'm going to try yours next B-con....Like my agrees comment B-Con I just meant to give you a rep point but you had to agree and write something. Maybe if you guys would be interested? would one of you guys be willing to test this for me. Just so I have a third party looking at it.. I could zip it and give it to you just to see what the problem is. You don't need the game that I have to run it, it doesn't do anything but ask a question, and show the answer.. Just a thought, but do you think it is possible that they made this beta, so that you couldn't release anything? Just a thought Last edited by Geo.Garnett : July 14th, 2005 at 11:21 AM. Reason: added a question?? |
|
#13
|
||||
|
||||
|
sure, post the entire source code so we can have a looksee....
No, the beta doesn't prohibit you from releasing anything. I use it to distribute all my programs just fine ![]() |
|
#14
|
||||
|
||||
|
Well B-con I have already put the source code in my other post.. I was thinking maybe I could send you the actual program maybe via aim or something like that.. If you don't want to do that, its fine I was just thinking maybe if you seen it you might know better what to do.. but just a thought..
|
|
#15
|
||||
|
||||
|
Oh, yeah, I remember you posting that
OK, so what is the exact path that the program needs? Is it on the desktop, in a subdirectory, or what? |
|
#16
|
||||
|
||||
|
OK, B-Con -- I finally had it with visual studio so I took your advice to someone elses post and downloaded dev.cpp. Now the program I wrote works on my friends pc. wierd
Nice program though, I see why you like it... ![]() |