-
July 23rd, 2008, 01:46 PM
#1
sharing exe's
Hi,
I just wanted to send a demo program of my Visual C++ application to a friend, (who isn't a programmer). In my first attempt, I copied all the DLL files I thought were necessary from my Windows/System32 folder, into the folder containing the exe, which i then zipped and sent.
After unzipping, my friend recieved the following message when trying to run the exe:
"This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem"
Is that likely to be missing DLLs?
I tried running my application from my visual C++ editor (debug mode)
and it shows the following list of DLLs
Code:
'freetypesuccess.exe': Loaded 'C:\Documents and Settings\Rav\My Documents\Visual Studio 2008\Projects\freetypesuccess\Debug\freetypesuccess.exe', Symbols loaded.
'freetypesuccess.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll'
'freetypesuccess.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll'
'freetypesuccess.exe': Loaded 'C:\WINDOWS\system32\opengl32.dll'
'freetypesuccess.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll'
'freetypesuccess.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll'
'freetypesuccess.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll'
'freetypesuccess.exe': Loaded 'C:\WINDOWS\system32\secur32.dll'
'freetypesuccess.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll'
'freetypesuccess.exe': Loaded 'C:\WINDOWS\system32\user32.dll'
'freetypesuccess.exe': Loaded 'C:\WINDOWS\system32\glu32.dll'
'freetypesuccess.exe': Loaded 'C:\WINDOWS\system32\ddraw.dll'
'freetypesuccess.exe': Loaded 'C:\WINDOWS\system32\dciman32.dll'
'freetypesuccess.exe': Loaded 'C:\WINDOWS\system32\glut32.dll', Binary was not built with debug information.
'freetypesuccess.exe': Loaded 'C:\WINDOWS\system32\winmm.dll'
'freetypesuccess.exe': Loaded 'C:\Documents and Settings\Rav\My Documents\Visual Studio 2008\Projects\freetypesuccess\Debug\glc32.dll', Binary was not built with debug information.
'freetypesuccess.exe': Loaded 'C:\Documents and Settings\Rav\My Documents\Visual Studio 2008\Projects\freetypesuccess\Debug\freetype6.dll', Binary was not built with debug information.
'freetypesuccess.exe': Loaded 'C:\Documents and Settings\Rav\My Documents\Visual Studio 2008\Projects\freetypesuccess\Debug\zlib1.dll', Binary was not built with debug information.
'freetypesuccess.exe': Loaded 'C:\Documents and Settings\Rav\My Documents\Visual Studio 2008\Projects\freetypesuccess\Debug\fontconfig.dll', Binary was not built with debug information.
'freetypesuccess.exe': Loaded 'C:\Documents and Settings\Rav\My Documents\Visual Studio 2008\Projects\freetypesuccess\Debug\xmlparse.dll', Binary was not built with debug information.
'freetypesuccess.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456\msvcp90d.dll'
'freetypesuccess.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456\msvcr90d.dll'
'freetypesuccess.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll'
'freetypesuccess.exe': Loaded 'C:\Program Files\SiteAdvisor\6261\saHook.dll'
'freetypesuccess.exe': Loaded 'C:\WINDOWS\system32\ialmgicd.dll', Binary was not built with debug information.
'freetypesuccess.exe': Loaded 'C:\WINDOWS\system32\ialmgdev.dll', Binary was not built with debug information.
'freetypesuccess.exe': Loaded 'C:\WINDOWS\system32\mcd32.dll'
'freetypesuccess.exe': Unloaded 'C:\WINDOWS\system32\mcd32.dll'
I suppose I could just painstakingly dump all these into the same folder as the exe before sending it to my friend, but I believe that some of them may depend on system specific configurations.
So whats the professional way to handle this?
-
July 23rd, 2008, 02:09 PM
#2
Re: sharing exe's
Please search the forums for keywords from the error message. This question has been asked many times.
-
July 23rd, 2008, 02:11 PM
#3
Re: sharing exe's
C++ compiles in to a stand alone .exe unless you have specifically linked to certain .dll files. Therfore the only .dll files you need to send him are the ones you linked to (if any)
-
July 23rd, 2008, 06:36 PM
#4
Re: sharing exe's
MS license agreement don't allow for distribution of debug runtime dll's.
Do you use VC express? If so you can ask your friend to install it.
If not, either your friend have to install VC9 runtime and you have to give him a release built exe or you can statically link the runtime to the exe (quite possible this violates the license as well).
All other dll's your app is using have to be handled in a similar way
-
July 23rd, 2008, 07:01 PM
#5
Re: sharing exe's
Compile your application as a Release build.
Then open a Visual studio command prompt and run "Depends.exe" on your application. This program will tell you which dependent dll's are missing.
-
July 24th, 2008, 01:46 AM
#6
Re: sharing exe's
I've noticed that your application is using both OpenGL and DirectX... none of these libraries should be copied across different machines. OpenGL support should be "compatible" with the driver of the installed graphics card. DirectX should be INSTALLED by running the setup provided by MS. For both packages, you should not mix different versions of the dlls. Image what may happen if GLUT vs 2.0 is using GL vs 1.1. Same goes for the dlls for DirectX.
Also, your application is using a dll from SiteAdvisor! The saHook.dll might need registration, registry entries, other dlls, and so on. It might be that the error message is refering to this application not being properly installed on your friends machine.
Best regards,
-
July 24th, 2008, 05:38 AM
#7
Re: sharing exe's
Originally Posted by Mikau
Hi,
After unzipping, my friend recieved the following message when trying to run the exe:
"This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem"
In visual studio after selecting the Release mode configuration follow the steps below.
This is for Win32 projects.
1. go to project properties.
2. Select "All Configuration" and then "Configuration properties"
3. Click in "C/C++" and then "Code generation"
4. In "Runtime Library" select "Multithreaded /MT" option.
5. Save and compile the Release mode and share it.
If you are using additional DLL like Glut then you need to give those also.
The error above arise when you have missing or different version of core redistributable DLLs.
For MFC use static linking option.
Kavitesh Singh
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|