Archived

This topic is now archived and is closed to further replies.

robinei

Troublesome DLLs

Recommended Posts

robinei    187
When I compile my project in VC 6.0 and send the binary to my friend for testing, he can''t start it because he lacks various msvc*.dll files. Is there a way to avoid this? Won''t he experience this problem if I build it as Release and not Debug?

Share this post


Link to post
Share on other sites
MadKeithV    992
No you''ll have to switch from dynamic linking to static linking with the MSVC DLLs...


People might not remember what you said, or what you did, but they will always remember how you made them feel.
~ (V)^|) |<é!t|-| ~

Share this post


Link to post
Share on other sites
Erik Labree    122
Do you use some kind of library (like MFC). If so i guess you''re linking dynamically to it. This requires the user to have certain dll''s on his/her computer. A solution would be to link statically this way all the code needed to run the prog is in a single exe file. Easy distribution.

You could set up your project to link dynamically in DEBUG mode and statically in RELEASE mode. If i''m correct this is what MFC does for you through AppWizard...

Hope it helps

Erik

Share this post


Link to post
Share on other sites
MadKeithV    992
Project->Settings->General->MFC : Statically Link to MFC.


People might not remember what you said, or what you did, but they will always remember how you made them feel.
~ (V)^|) |<é!t|-| ~

Share this post


Link to post
Share on other sites
robinei    187
No I''m not using MFC.(I''ve selected not using MFC)

The msvc*.dll files have nothing with MFC to do I think.

Any idea what they are and where I can make the VC statically link them?

Share this post


Link to post
Share on other sites
MadKeithV    992
Mscvrt.dll by any chance?

That''s the C Runtime Library DLL...

From MSDN:

When you build a release version of your project, one of the basic C run-time libraries (LIBC.LIB, LIBCMT.LIB, and MSVCRT.LIB) is linked by default, depending on the compiler option you choose (single-threaded, multithreaded, or DLL). Depending on the headers you use in your code, a library from the Standard C++ libraries or one from the old iostream libraries may also be linked..

People might not remember what you said, or what you did, but they will always remember how you made them feel.
~ (V)^|) |<é!t|-| ~

Share this post


Link to post
Share on other sites
robinei    187
Well, I tried building a release version of the project and went to windows/system and renamed one of the dll files, and it worked. So it seems that all required libraries ar statically linked to the exe when building a release version.

I think maybe the file you mentioned was one of the required files, but it was not the only one.

Share this post


Link to post
Share on other sites