Include all the libraries in the exe

Hi,

i have written a program in C++ which uses many libraries and include many cpp and hpp files.

I compile it successfully.
I run the exe file successfully on my pc but in other pcs i get the message that the msvcp100d.dll file is missing.

I am using MSVS 2010 and at the output i get the message :
" 'das.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Cannot find or open the PDB file ".

I ignored it all this time after many compiles. I do not know if the fault is here.

Of course i get many other messages like this.

But the compile ends successfully without errors.


I think that i need to include the libraries in the exe but i am not sure.



I changed the option in the Project properties:

Configuration Properties - C++ - Code Generation: Runtime Library

to "Multi Threaded" but i get over 70 errors like this:
Error 59 error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Pninc(void)" (?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ) already defined in BasicExcel.obj
C:\Users\Christos\Desktop\DAS\das\das\msvcprtd.lib(MSVCP100D.dll)
das


Any ideas?
Yes, if you use dynamically linked libraries, you need to provide those dll's for an application to run. The lack of PDB (program database) file is not an issue during deployment - it is only related to debugging. The error which shows up when you change to static CRT libraries means that some of your other libraries/subprojects in your solution use the dynamically-linked CRT, so you won't be able to link the CRT statically unless you recompile all your dependencies to use static CRT.

To deploy your application successfully you need to include all the dll's that it uses. For third-party libraries you may just copy the dll's along with your application. As for CRT dll's - see here: http://msdn.microsoft.com/en-us/library/zebw5zk9(v=vs.100).aspx

Also, quite an easy way to see which dll's are missing on other pc's is to use dependency walker:
http://www.dependencywalker.com/
" so you won't be able to link the CRT statically unless you recompile all your dependencies to use static CRT."


So what i have to do in order to get an indepedent executable file?

My project is as shown at the photo:
http://imageshack.us/photo/my-images/29/projectxs.png/

The folder "External Dependencies" have hundreds of files.

What exactly do i have to do?
In the settings of your project you will find in C/C++ section this:

http://msdn.microsoft.com/en-us/library/abx4dbyh%28v=vs.100%29.aspx

Take care that you don't mix debug and release. Compile the release version to run on other computer
So what i have to do?

Put all these libraries, where?
if you change the settings for the runtime library from Multithreaded-DLL to Multithreaded (note: without DLL) then you don't need to provide DLL's.
As i said, i did it but i get many errors like the one described in my first post
You need to recompile all libraries that you use the same way.
how can i do that?
Do you know what's the difference between a Debug and Release version is?

(Yes for debug you change Multithreaded-Debug-DLL to Multithreaded-Debug, but you schouldn't deploy debug versions)
I think i know the difference...

When i tried what you told me i was on release mode and "Multithreaded" option was on, but i was still getting 77 errors.
Topic archived. No new replies allowed.