Boost logo

Boost Users :

From: Jeff Garland (jeff_at_[hidden])
Date: 2006-09-04 11:05:32


V wrote:
> Hi
>
> I have a small project with boost 1.33 + libtorrent 0.10 + wxwidgets
> 2.7.0 + msvc 8.0 (2005) express.
>
> in project config -> linker -> input -> add. dep.
> I have (among other libs):
> libboost_filesystem-vc80-mt-gd.lib
> libboost_thread-vc80-mt-gd.lib
> libboost_date_time-vc80-mt-gd.lib
>
> and linker says:
> tracker_manager.obj : error LNK2001: unresolved external symbol
> "__declspec(dllimport) public: __thiscall
> boost::gregorian::greg_month::greg_month(unsigned short)"
> (__imp_??0greg_month_at_gregorian@boost@@QAE_at_G@Z)
> web_peer_connection.obj : error LNK2001: unresolved external symbol
> "__declspec(dllimport) public: __thiscall
> boost::gregorian::greg_month::greg_month(unsigned short)"
> (__imp_??0greg_month_at_gregorian@boost@@QAE_at_G@Z)
> storage.obj : error LNK2001: unresolved external symbol
> "__declspec(dllimport) public: __thiscall
> boost::gregorian::greg_month::greg_month(unsigned short)"
> (__imp_??0greg_month_at_gregorian@boost@@QAE_at_G@Z)
>
>
> Now, when I change libboost_date_time-vc80-mt-gd.lib to
> boost_date_time-vc80-mt-gd.lib
>
> then it links fine and runs fine, excpet that .exe it needs
> boost_date_time-vc80-mt-gd-1_33_1.dll in a running directory.
>
> Why isnt gregorian stuff in boost_date_time*.lib -s ?

These functions are all inline in 1.33 AFAIK....so this seems strange. Are
you using to_string/from_string? If so, you might be able to eliminate these
and get rid of the library altogether.

Anyway, there are 2 kinds of linking: static and dynamic. On windows for
static linking you typically have a single .lib file to statically link the
functions. For dynamic linking you have a .lib for build time and then need
the .dll are runtime. My guess is that somehow you are linking against the
'dynamic .lib' instead of the 'static .lib'....

Sorry if this is a bit sketchy...I don't develop with Boost on Windows much so
I don't have a built directory to reference at the moment...

Jeff

Jeff


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net