954,506 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how to use a vs2005 app on non-development PC

I made an application in vc++ on VS2005, but it doesn't work on non-development PCs. I did the same program on vs 0.6 and it worked very well. but perhaps there is another way to do it, say with a setup or something of the kind?

gabs
Light Poster
26 posts since Dec 2006
Reputation Points: 10
Solved Threads: 1
 

It may help if you elaborate on "Doesn't work on a non-development PC" ... What sort of error did you get when you tried to run it? (Assuming you got an error)

What kind of app did you create in VS2005? - Was it a Win32 console app, or something else?

Did you use anything from any DLL's (Or maybe included headers from some Windows-specific APIs)? and did you compile it in Release Mode (rather than debug mode)?

Bench
Posting Pro
577 posts since Feb 2006
Reputation Points: 307
Solved Threads: 63
 
and did you compile it in Release Mode (rather than debug mode)?



I think that might be the problem. Go to build --> Configuration Manager and select 'Release' instead of 'debug', close the window and press F5. You will now have a new sub-directory in your project's folder 'release' with the executable in it.

Regards Niek

[edit]
ps. Does your other PC have .NET Framework 2.0?
[/edit]

Nick Evan
Not a Llama
Moderator
10,112 posts since Oct 2006
Reputation Points: 4,142
Solved Threads: 403
 
ps. Does your other PC have .NET Framework 2.0?

I don't think so... I tried the release solution you offered, that's not enough. some dll is missing - and when I try to add it manually, it wont take it. this application is a win32 - windows application.
is there anyway I can tell it to create a file with all the libraries and dlls needed?

thanks
Gabs

gabs
Light Poster
26 posts since Dec 2006
Reputation Points: 10
Solved Threads: 1
 

What's the name of the DLL? That might be a help..

Chances are its not just one DLL thats missing, but a whole package. For example, if you used Direct3D in your program, and attempted to run the program on a computer without DirectX installed, you'd probably get an error that there's a missing DLL, wheras in fact, DirectX has a whole bunch of DLLs (among other things).

In this case, you couldn't simply get away with bundling your program with some DLL files taken from DirectX, you'd need to supply the whole DirectX package, and insist that the user installs it (This is what most games do).

Whichever file is missing, I doubt that its anything specific to the development environment, its more likely to be some windows package or driver thats missing on your target system.

Bench
Posting Pro
577 posts since Feb 2006
Reputation Points: 307
Solved Threads: 63
 

thanks, I found the dll that was missing; I add it and it worked.:cheesy:

but I won't always know what dll is missing ahead, so is there a way to create a setup that will include everything needed? without needing to go back and forth until the problem is understood and the solution is found?

gabs
Light Poster
26 posts since Dec 2006
Reputation Points: 10
Solved Threads: 1
 
thanks, I found the dll that was missing; I add it and it worked.:cheesy: but I won't always know what dll is missing ahead, so is there a way to create a setup that will include everything needed? without needing to go back and forth until the problem is understood and the solution is found?

None that I can think of. I'd guess the reason goes back to my example of DirectX - neither the compiler nor the IDE can make any assumptions about the target machine - so thats left up to the developer to know what external files the program is using (And to specify minimum system requirements if necessary - eg, some DLLs may only be available under NT/2K/XP/etc ).

There's probably an issue of licensing too - If you ended up using half the DLLs from Windows, then you'd probably not be (legally) allowed to redistribute Microsoft's own content with your installers.

Bench
Posting Pro
577 posts since Feb 2006
Reputation Points: 307
Solved Threads: 63
 

also the end user pc needs .NET Framework 2

jbennet
Moderator
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,826
Solved Threads: 601
 

that's not always enough. Special stuff is needed, which is only added by installer creators designed for Visual Studio 2005.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

doesnt the installer wizard automatcially add dependencied in VS2005?

jbennet
Moderator
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,826
Solved Threads: 601
 

Doesn't VC++ have an option to create a deployment or application wizard? With this you create a setup file and the DLLs needed are loaded into the target system.

WaltP
Posting Sage w/ dash of thyme
Moderator
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
 

the application deployment wizard is under the project properties tab (where you set icons, startup form, compile options etc...)
you can add additional dependencies in this page

This wizard is cut down in express editon by the way so if your using that, your out odf luck

jbennet
Moderator
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,826
Solved Threads: 601
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You