Hi Eric,<div><br></div><div>Thanks for the reply. It was very useful. I incorporated the changes you mentioned. I removed all the link_libraries macros</div><div>from the projects. Also I changed camke_minimum_version to 2.6 . I have CMake 2.8 in both windows as well as Linux. Though</div>
<div>I am still getting the same errors.I would strip the project down to one or two lib and I would get back with the results.</div><div><br></div><div>Though one point I would like to mention, the linker problem is coming for all the libraries in project added through</div>
<div>ADD_LIBRARY macro. While the linker is produced correct to target added with ADD_EXECUTABLES. I had only one </div><div>executable in my whole project and it is in the root CMakeLists.txt. When I remove the main.cpp from ADD_EXECUTABLES</div>
<div>and replace it with ADD_LIBRARY, I get linker error for root too, again no linker is generated for ADD_LIBRARY target.</div><div><br></div><div>For the find_package macro as you mentioned, it worked for BOOST and OPenCV but did not find ImageMagick, so I hardcoded</div>
<div>the includes and Libraries.</div><div><br></div><div>Regards</div><div>Avanindra <br><br><div class="gmail_quote">On Sat, Jan 8, 2011 at 8:15 PM, Eric Noulard <span dir="ltr"><<a href="mailto:eric.noulard@gmail.com">eric.noulard@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">> Hi john,<br>
><br>
> Thanks for the reply.Multiple TARGET_LINK_LIBRARIES<br>
> did not give any configuration error. Though I removed the WIN32 If<br>
> block, but I am still getting the same linking errors.<br>
> TARGET_LINK_LIBRARIES(hybridnccsurfacecoloring bundler imagelib matrix mathlib<br>
> 5point libsba libepnp<br>
> sfm libDescriptors f2c minpack lapack ann getopt jpeg)<br>
> #if(WIN32)<br>
> #TARGET_LINK_LIBRARIES(hybridnccsurfacecoloring getopt jpeg)<br>
> #endif(WIN32)<br>
> I am absolutely clueless why the linker is not generated in the msvc<br>
> project. Any idea what could be the possible reason for it?...<br>
<br>
</div>May be you can a try a simpler executable target which only requires<br>
one lib then try this example both on Linux and MSVC.<br>
<br>
The idea is, scale down your problem to something more easy to<br>
understand for us.<br>
In the current case we don't know if ALL your target are failing to<br>
link or some of them<br>
which symbols are missing etc...<br>
<br>
Which version of CMake are you using (On Linux and on Windows)?<br>
Did you try with Code::Blocks on windows?<br>
<br>
Are the find_package statement successful on Windows too?<br>
e.g. does;<br>
<div class="im">find_package(ImageMagick COMPONENTS Magick++ MagickCore)<br>
</div>leads to ImageMagick_FOUND or not?<br>
<div class="im"><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 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 <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>