Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
Hi,

I have compiled my Dll with project configuration as MultiThreaded Dll., and my Application exe to which i am linking this Dll is also compiled as MultiThreaded Dll., But When i compile i am getting Linker Error Saying :

"
VB
Error   155 error LNK1104: cannot open file 'libboost_log-vc100-mt-sgd-1_49.lib'    <MyLibarayProjectpath>\LINK   <LibraryName>

"

Note that :: The Boost Libaray that it is trying to open is a static mode libarary. Why is my project that is compiled as Multithreaded Dll trying to Open a Satic Library while linking and failing because of that.

Any Suggestions ..

Thanks
Sajith
Posted
Comments
Richard MacCutchan 29-Jun-13 5:41am    
The lib file contains the definitions and links for the references in the DLL, so the linker still needs to read it. Given the name (contains mt) it looks like it is the multi-threaded version.
gssajith87 29-Jun-13 10:21am    
@Richard macCutchan, Thanks for your time. Do you mean that i have wrongly compiled the boost lib.
Richard MacCutchan 29-Jun-13 11:12am    
I cannot answer that question.
What I am saying is that when linking your executable, the linker needs to access the .lib files that contain the definitions for all the classes and functions that you are trying to access from the DLL. The message you see above tells you that it cannot find the file named libboost_log-vc100-mt-sgd-1_49.lib. So you should check where that file is, and make sure it is available to the linker when you try to build your project.
gssajith87 29-Jun-13 23:00pm    
@Richard macCutchan. I can see that the lib file is available in the location that i have given as input directories to the linker.
One more clarification., "libboost_log-vc100-mt-sgd-1_49.lib" is the one that cannot be find by the application., but i expect my application to look for "libboost_log-vc100-mt-gd-1_49.lib" [-gd instead of -sgd] , as i am compiling it as a MultiThreadedDll . Is my question valid., sorry if not.

Richard MacCutchan 30-Jun-13 3:05am    
You need to check your project's configuration to see why it wants this file rather than the one you think it should be.

1 solution

Sorry For the Delay,

This was the problem, i had a Vs 2010 solution File that had muliple projects in it., two projects where compiled as libraries and one as dll all linked to the Main Exe Project.

I was trying to compile my exe and dll project as Multithreaded Dll while my other projects in the solution where still Multithread and hence When i compiled my application, it was compiling all the lib and dll and libs where looking for the "libboost_log-vc100-mt-sgd-1_49.lib." which was actually not present in the library folder i linked too.

@Richard MacCutchan Thanks for your time.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900