Hi Martin,<div><br></div><div>You are right. I messed up between shared and static libraries. There is a jpeg lib, which I was initially building as static lib and linking to the main project and I don't know why</div>
<div>it was not getting linked. I built it as SHARED lib and the whole project compiled successfully.</div><div><br></div><div>Thanks A lot.</div><div><br></div><div>Hi Eric,</div><div><br></div><div>Thanks for the <span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><a href="http://www.cmake.org/Wiki/BuildingWinDLL" target="_blank" style="color: rgb(0, 0, 204); ">BuildingWinDLL</a></span> link. It was very helpful.</div>
<div><br></div><div> I compiled the lib as SHARED (the library which was not found by the linker) and project compiled sucessfully.</div><div>Though I still don't understand why was it not getting linked when I compiled it as STATIC library? </div>
<div><br></div><div>Thanks a lot for replying my questions.</div><div><br></div><div>Regards</div><div>Avanindra </div><div><br><div class="gmail_quote">On Sat, Jan 8, 2011 at 10:27 PM, Martin O'Brien <span dir="ltr"><<a href="mailto:martin.matthew.obrien@gmail.com">martin.matthew.obrien@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">If you're seeing a 'Librarian' tab instead of a 'Linker' tab, then you're<br>
building a static library, not a dll.<br>
<br>
I'm not sure which you are expecting.<br>
<br>
Could you post the results of the build? Seeing the actual errors would<br>
help.<br>
<br>
<br>
mm<br>
<div class="im"><br>
-----Original Message-----<br>
From: <a href="mailto:cmake-bounces@cmake.org">cmake-bounces@cmake.org</a> [mailto:<a href="mailto:cmake-bounces@cmake.org">cmake-bounces@cmake.org</a>] On Behalf Of<br>
</div><div class="im">Eric Noulard<br>
Sent: Saturday, January 08, 2011 11:35 AM<br>
To: Avanindra Singh<br>
Cc: CMake mailing list<br>
</div><div><div></div><div class="h5">Subject: Re: [CMake] Fwd: TARGET_LINK_LIBRARIES not working for MSVC<br>
<br>
2011/1/8 Avanindra Singh <<a href="mailto:avanindra.singh@gmail.com">avanindra.singh@gmail.com</a>>:<br>
> Hi Eric,<br>
> Thanks for the reply. It was very useful. I incorporated the changes you<br>
> mentioned. I removed all the link_libraries macros<br>
> from the projects. Also I changed camke_minimum_version to 2.6 . I have<br>
> CMake 2.8 in both windows as well as Linux. Though<br>
> I am still getting the same errors.I would strip the project down to one<br>
or<br>
> two lib and I would get back with the results.<br>
> Though one point I would like to mention, the linker problem is coming for<br>
> all the libraries in project added through<br>
> ADD_LIBRARY macro.<br>
<br>
Do you handle the visibility of symbols in libraries properly?<br>
On Linux the [usual] default is to have all symbol exported whereas<br>
it's the converse on Windows (no symbol exported unless specified).<br>
<br>
You have to use<br>
__declspec(dllexport)<br>
__declspec(dllimport)<br>
statement in the Windows case.<br>
<br>
See:<br>
<a href="http://www.cmake.org/Wiki/BuildingWinDLL" target="_blank">http://www.cmake.org/Wiki/BuildingWinDLL</a><br>
<br>
--<br>
Erk<br>
Membre de l'April - « promouvoir et défendre le logiciel libre » -<br>
<a href="http://www.april.org" target="_blank">http://www.april.org</a><br>
</div></div><div><div></div><div class="h5">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at:<br>
<a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br></div>