Jump to content
  • Advertisement
Sign in to follow this  

Linker Error with boost signals

This topic is 3052 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

I just don't get it.... I'm using Boost 1.42 with Visual Studio 2008. I successfully built boost with bjam and set up the additional Linker and Include-Directories. Finally, I included the signals.h and linked against the lib using:
#include <boost/signals.hpp>
#ifdef DEBUG
	#pragma comment ( lib, "boost_signals-vc90-mt-gd-1_42.lib" )
	#pragma comment ( lib, "boost_signals-vc90-mt-1_42.lib" )

In my code I just used a simple boost:signal and called it, but I all got was the well-known linker error:
1>main.obj : error LNK2001: Unresolved external symbol 
""__declspec(dllimport) public: __thiscall boost::signals::detail::call_notification::call_notification(class boost::ptr<class boost::signals::detail::signal_base_impl> const &)" (__imp_??0call_notification@detail@(etc. etc.))".

Share this post

Link to post
Share on other sites
I guess there are a few simple things to check:

First, do a complete clean build.

Second, check that BOOST_ALL_DYN_LINK is actually defined somewhere, ideally in the project settings so that it's provided as a command line PP-define.

Thirdly, try removing the #pragma comment(lib) facility and providing the library to link to using the project settings window I think its somewhere under Linker->Additional Dependencies. (As an aside, #pragma-comment-lib is not very portable)

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!