|
-
June 29th, 2005, 05:56 AM
#1
Trouble linking with boost libs
Hi all
Im having some headaches using the boost filesystem lib and hope someone can offer advice as im pickled!
My recipie for disaster is two projects, one a static lib that uses boost::filesystem. The second is a client executable that uses my static lib.
Where is the linker getting the boost lib from? Usually to utilise a static library I would include the headers in my code and specify the library in the project's link options. In this case I did not specify the lib in the link tab, and when compiling i got a "cannot find libboost_filesystem-vc6-mt-gd-1_32.lib" error instead of an unresolved external error that I was expecting.
Anyway my library linked ok once i dropped libboost_filesystem-vc6-mt-gd-1_32.lib into the project dir.
Next i came to build my executable project, now the header from my library must include the boost/filesystem/path.hpp file because a class in my library has a BFS: ath as a member. When linking I got a simmilar error to when building the library: "cannot find libboost_filesystem-vc6-sgd-1_32.lib". Both projects are configured as Debug Single Threaded runtime but the library project wanted the mt boost lib and the exe project wanted the st version!
I dont want my exe linking directly against boost and i dont see why it should wan't to either as my static library links to the required boost functionality.
I hope this makes sense!
regards
chris
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|