Question

I am very new to boost. I needed to get the library files for one file thats used in an application that was made for me (so I can recompile the app myself).

I am able to make the boost library files, but a few of the files have an error and dont get made.

Here is the error copied from command prompt (note all I did to make the files was run ".\b2 link=shared")

Creating library bin.v2\libs\thread\build\msvc-11.0\release\threading-multi\b oost_thread-vc110-mt-1_54.lib and object bin.v2\libs\thread\build\msvc-11.0\rele ase\threading-multi\boost_thread-vc110-mt-1_54.exp thread.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) pu blic: __thiscall boost::gregorian::greg_month::greg_month(unsigned short)" (_im p??0greg_month@gregorian@boost@@QAE@G@Z) referenced in function "public: __this call boost::gregorian::date::date(enum boost::date_time::special_values)" (??0da te@gregorian@boost@@QAE@W4special_values@date_time@2@@Z) bin.v2\libs\thread\build\msvc-11.0\release\threading-multi\boost_thread-vc110-mt -1_54.dll : fatal error LNK1120: 1 unresolved externals

Any help is greatly appreciated. Thanks

Was it helpful?

Solution

For 32 bit boost, start a 32 bit command prompt. (on 64 bit Windows you find this in C:\Windows\SysWOW64\cmd.exe). Then run "bootstrap.bat" from the Boost root directory. This creates an appropriate b2.exe. Then run

b2 link=shared address-model=32

your command as before. (Although I noticed you tagged boost-thread; to build just the thread libraries, append--with-thread to the command).

For 64 bit boost (on 64 bit OS), start a 64 bit command prompt (C:\Windows\System32\cmd.exe). Yes I know that looks odd but, trust me. Run "boostrap.bat" again, then

b2 link=shared address-model=64
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top