C/C++ Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingC/C++ Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 12th, 2005, 05:55 PM
Geo.Garnett's Avatar
Geo.Garnett Geo.Garnett is offline
Registered Loser
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Retardation Nation...
Posts: 347 Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level)Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 3 h 13 m 45 sec
Reputation Power: 4
Send a message via AIM to Geo.Garnett
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 next

Last edited by Geo.Garnett : July 13th, 2005 at 01:08 AM. Reason: adding an additional explanation of my question

Reply With Quote
  #2  
Old July 13th, 2005, 09:27 AM
ShadowCoder ShadowCoder is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2005
Location: Ottawa
Posts: 20 ShadowCoder User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 54 m 12 sec
Reputation Power: 0
Did you build it in Release or Debug mode? If you built it in Debug mode then switch it to Release and rebuild it.

Reply With Quote
  #3  
Old July 13th, 2005, 10:30 AM
Geo.Garnett's Avatar
Geo.Garnett Geo.Garnett is offline
Registered Loser
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Retardation Nation...
Posts: 347 Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level)Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 3 h 13 m 45 sec
Reputation Power: 4
Send a message via AIM to Geo.Garnett
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.

Reply With Quote
  #4  
Old July 13th, 2005, 07:48 PM
B-Con's Avatar
B-Con B-Con is offline
:bcon: moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Location: int main()
Posts: 351 B-Con User rank is Private First Class (20 - 50 Reputation Level)B-Con User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Days 23 h 1 m 43 sec
Reputation Power: 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.



Reply With Quote
  #5  
Old July 13th, 2005, 08:08 PM
Geo.Garnett's Avatar
Geo.Garnett Geo.Garnett is offline
Registered Loser
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Retardation Nation...
Posts: 347 Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level)Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 3 h 13 m 45 sec
Reputation Power: 4
Send a message via AIM to Geo.Garnett
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.

Reply With Quote
  #6  
Old July 13th, 2005, 08:51 PM
B-Con's Avatar
B-Con B-Con is offline
:bcon: moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Location: int main()
Posts: 351 B-Con User rank is Private First Class (20 - 50 Reputation Level)B-Con User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Days 23 h 1 m 43 sec
Reputation Power: 4
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....

Reply With Quote
  #7  
Old July 13th, 2005, 08:58 PM
Geo.Garnett's Avatar
Geo.Garnett Geo.Garnett is offline
Registered Loser
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Retardation Nation...
Posts: 347 Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level)Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 3 h 13 m 45 sec
Reputation Power: 4
Send a message via AIM to Geo.Garnett
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...

Reply With Quote
  #8  
Old July 13th, 2005, 09:51 PM
B-Con's Avatar
B-Con B-Con is offline
:bcon: moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Location: int main()
Posts: 351 B-Con User rank is Private First Class (20 - 50 Reputation Level)B-Con User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Days 23 h 1 m 43 sec
Reputation Power: 4
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....

Reply With Quote
  #9  
Old July 14th, 2005, 12:11 AM
Geo.Garnett's Avatar
Geo.Garnett Geo.Garnett is offline
Registered Loser
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Retardation Nation...
Posts: 347 Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level)Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 3 h 13 m 45 sec
Reputation Power: 4
Send a message via AIM to Geo.Garnett
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!!!!!

Reply With Quote
  #10  
Old July 14th, 2005, 02:16 AM
B-Con's Avatar
B-Con B-Con is offline
:bcon: moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Location: int main()
Posts: 351 B-Con User rank is Private First Class (20 - 50 Reputation Level)B-Con User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Days 23 h 1 m 43 sec
Reputation Power: 4
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....
Comments on this post
Geo.Garnett agrees: If It Wasnt For You I Would Still Be Lost=)

Reply With Quote
  #11  
Old July 14th, 2005, 03:56 AM
proghelper proghelper is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 12 proghelper User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 46 m 21 sec
Reputation Power: 0
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

Reply With Quote
  #12  
Old July 14th, 2005, 10:16 AM
Geo.Garnett's Avatar
Geo.Garnett Geo.Garnett is offline
Registered Loser
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Retardation Nation...
Posts: 347 Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level)Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 3 h 13 m 45 sec
Reputation Power: 4
Send a message via AIM to Geo.Garnett
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??

Reply With Quote
  #13  
Old July 14th, 2005, 02:08 PM
B-Con's Avatar
B-Con B-Con is offline
:bcon: moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Location: int main()
Posts: 351 B-Con User rank is Private First Class (20 - 50 Reputation Level)B-Con User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Days 23 h 1 m 43 sec
Reputation Power: 4
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

Reply With Quote
  #14  
Old July 14th, 2005, 05:25 PM
Geo.Garnett's Avatar
Geo.Garnett Geo.Garnett is offline
Registered Loser
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Retardation Nation...
Posts: 347 Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level)Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 3 h 13 m 45 sec
Reputation Power: 4
Send a message via AIM to Geo.Garnett
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..

Reply With Quote
  #15  
Old July 14th, 2005, 07:00 PM
B-Con's Avatar
B-Con B-Con is offline
:bcon: moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Location: int main()
Posts: 351 B-Con User rank is Private First Class (20 - 50 Reputation Level)B-Con User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Days 23 h 1 m 43 sec
Reputation Power: 4
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?

Reply With Quote
  #16  
Old July 14th, 2005, 10:13 PM
Geo.Garnett's Avatar
Geo.Garnett Geo.Garnett is offline
Registered Loser
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Retardation Nation...
Posts: 347 Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level)Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 3 h 13 m 45 sec
Reputation Power: 4
Send a message via AIM to Geo.Garnett
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...

Reply With Quote