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?

Recommended Answers

All 11 Replies

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)?

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]

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

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.

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?

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.

also the end user pc needs .NET Framework 2

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

doesnt the installer wizard automatcially add dependencied in VS2005?

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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.