Jump to content
  • Advertisement
Sign in to follow this  
sipickles

MSVC++ and DLLs

This topic is 3702 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I have two dev machines, a Desktop and a laptop. My app, c++ on windows using MSVC2005, has a core executable which loads DLLs for each of the components. I have an odd discrepancy between my two machines. On my desktop, my Network.dll loads using ::LoadLibrary("Network.dll"){/code]but it doesn't load on my laptop. Other DLLs load on both, and are in the same folder, so its not a path issue. The only difference between the DLLs that load on both machines and the one that doesn't is that Network.dll has its own dependancy on boost_thread-vc80-mt-gd-1_35.lib (it uses boost.asio) Can anyone hazard a guess what might be behind this? Its a new one on me! Thanks Simon

Share this post


Link to post
Share on other sites
Advertisement
Check the working folder in your VC++ project settings (Project/Properties/Debugging) and make sure it is set identically on both machines.

Share this post


Link to post
Share on other sites
Hmm, thats not it I am afraid.

Interestingly, now it won't load on either machine.

I've commented out bits until it DOES load, and deduced that the line

#include "boost//asio.hpp"

causes it to break. I guess I am not fulfilling some sort of dependency of Asio. I know it uses boost::system (I have to link to libboost_system-mt-gd-1_35.lib to get it to compile).

I've tried putting boost_system-mt-gd-1_35.dll in the working folder, but no change.

Thanks for any advice. This is causing me some problems! :)

Si

Share this post


Link to post
Share on other sites
I had some problems linking to boost before - I told the BoostPro installer to not download everything because I didn't think I'd need it. A lot of linking problems went away when I stopped trying to be smart.

Are you compiling with /MD and /MDd? Properties > C/C++ > Code Generation > Runtime Library. When I get weird problems like this, I like to fudge around with the code generation settings and sometimes it starts working. I like to tell myself that everybody is doing it that way.

Dependency walker is a good tool for debugging things like this.

Share this post


Link to post
Share on other sites
Thanks!

I thought I'd tried that..... BUT by not using
//#define BOOST_ALL_DYN_LINK
//#define BOOST_ALL_NO_LIB

and codegenerating with option "MultiThreaded debug", instead of "Multithreaded debug dll" seems to make it work ... for now....!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!