I have been trying to use Boost Date_Time library with my code. I used boostjam to compile the source; the command used was: bjam -s"TOOLS=vc-7_1" --with-date_time install. The following libraries were built (among others): boost_date_time-vc71-mt-1_32.dll 45,056bytes boost_date_time-vc71-mt-1_32.lib 26,164bytes libboost_date_time-vc71-mt-1_32.lib 521,764bytes boost_date_time-vc71-mt-gd-1_32.dll 77,824bytes boost_date_time-vc71-mt-gd-1_32.lib 26,312bytes libboost_date_time-vc71-mt-gd-1_32.lib 1,380,694bytes My project is setup as follows: Runtime Library: Multi-threaded Debug DLL (/MDd) Additional Include Directories: $(BOOSTHOME)\include\boost-1_32 Additional Library Directories: $(BOOSTHOME)\lib Additional Dependencies: boost_date_time-vc71-mt-gd-1_32.lib Using the above setup I could only link if the static library (libboost_date_time-vc71-mt-gd-1_32.lib) was also available. If not, I kept getting LINK : fatal error LNK1104: cannot open file 'libboost_date_time-vc71-mt-gd-1_32.lib' However, when this file is available, I am able to link and use the DLL (checked DLL usage using depends.exe). Does this make sense? I was under the impression that I should only need the import library. Also, how does it know the name if the library? Thanks.
You usually don't need to specify the boost lib, that is done
automatically depending on your project settings.
For dynamic linking you also need to have a .lib file. But this time
the .lib file only contains functions declaration, but no
implementation. Those are in the DLL.
Does that help?
Greets,
Christian
On 8/3/05, John Smith
I have been trying to use Boost Date_Time library with my code. I used boostjam to compile the source; the command used was: bjam -s"TOOLS=vc-7_1" --with-date_time install. The following libraries were built (among others): boost_date_time-vc71-mt-1_32.dll 45,056bytes boost_date_time-vc71-mt-1_32.lib 26,164bytes libboost_date_time-vc71-mt-1_32.lib 521,764bytes
boost_date_time-vc71-mt-gd-1_32.dll 77,824bytes boost_date_time-vc71-mt-gd-1_32.lib 26,312bytes libboost_date_time-vc71-mt-gd-1_32.lib 1,380,694bytes
My project is setup as follows: Runtime Library: Multi-threaded Debug DLL (/MDd) Additional Include Directories: $(BOOSTHOME)\include\boost-1_32 Additional Library Directories: $(BOOSTHOME)\lib Additional Dependencies: boost_date_time-vc71-mt-gd-1_32.lib
Using the above setup I could only link if the static library (libboost_date_time-vc71-mt-gd-1_32.lib) was also available. If not, I kept getting LINK : fatal error LNK1104: cannot open file 'libboost_date_time-vc71-mt-gd-1_32.lib' However, when this file is available, I am able to link and use the DLL (checked DLL usage using depends.exe).
Does this make sense? I was under the impression that I should only need the import library. Also, how does it know the name if the library?
Thanks.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
No, it does not.
The library that you are referring to is the import library. I am using that
already. My point is, it seems to need the import library AND the static
library (during linking). That does not make sense. Please see my first
message for the details.
"Christian Henning"
You usually don't need to specify the boost lib, that is done automatically depending on your project settings.
For dynamic linking you also need to have a .lib file. But this time the .lib file only contains functions declaration, but no implementation. Those are in the DLL.
Does that help?
Greets, Christian
Hi, boost autolinking uses special macros that are to be defined in project settings (link below for details). (http://www.boost.org/more/getting_started.html#auto-link). The simpliest way to link to dll is adding BOOST_ALL_DYN_LINK to project setting for all configuration (visual studio I mean;) Sure the dlls should be on the path or in the same directory as the executable;)
No, it does not.
The library that you are referring to is the import library. I am using that already. My point is, it seems to need the import library AND the static library (during linking). That does not make sense. Please see my first message for the details.
"Christian Henning"
wrote in message news:9498013105080309064b848d53@mail.gmail.com... You usually don't need to specify the boost lib, that is done automatically depending on your project settings.
For dynamic linking you also need to have a .lib file. But this time the .lib file only contains functions declaration, but no implementation. Those are in the DLL.
Does that help?
Greets, Christian
That works! Thanks for your help.
"Serge Skorokhodov"
Hi,
boost autolinking uses special macros that are to be defined in project settings (link below for details).
(http://www.boost.org/more/getting_started.html#auto-link).
The simpliest way to link to dll is adding BOOST_ALL_DYN_LINK to project setting for all configuration (visual studio I mean;)
Sure the dlls should be on the path or in the same directory as the executable;)
No, it does not.
The library that you are referring to is the import library. I am using that already. My point is, it seems to need the import library AND the static library (during linking). That does not make sense. Please see my first message for the details.
participants (3)
-
Christian Henning
-
John Smith
-
Serge Skorokhodov