<div dir="ltr"><div><div>&gt;Why there is a &quot;l&quot; letter in front of every lib?<br><br></div><div>The &quot;/l&quot; option specifies to the linker what to link. The error messages are telling you that it can&#39;t find the libraries to be linked, probably because of various errors in your CMakeLists.txt file.<br>


<br></div>__________________________________________________________________________________<br><br> This line is not needed.<br><br>SET(DMITK CMAKE_CXX_FLAGS_RELEASE)<br><br> If you only want Release, you can do that by only building Release in the Visual Studio IDE itself.<br>


------------------------------------------------------------------------------------------------------------------------------------------------<br><br></div>I assume you are trying to link to some libraries in the following 2 directories?<br>


<div><br> INCLUDE_DIRECTORIES( C:/ITK/build/lib/Release )<br>
 INCLUDE_DIRECTORIES( C:/ProgramData/Gatan/DMSDK/<div>lib/x64 )<br><br></div><div>You need to use link_directories command if this is the case. <br><a href="http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:link_directories" target="_blank">http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:link_directories</a><br>


<br>____________________________________________________________________________________<br></div><br></div><div>I don&#39;t think you need this last line.<br></div><div><br>
LINK_LIBRARIES(${ITK_LIBRARIES} DMPlugInBasic.lib Foundation.lib)<br><br>____________________________________________________________________________________<br><br>Here is a pretty minimal example of a CMake file that demonstrates what needs to be done to include ITK and link to it.<br>


<br><a href="https://github.com/hocheung20/test_debug_assertion_performance/blob/master/CMakeLists.txt" target="_blank">https://github.com/hocheung20/test_debug_assertion_performance/blob/master/CMakeLists.txt</a><br><br>

</div><div>Hope this helps,<br></div><div class="gmail_extra">
<br clear="all"><div><div dir="ltr">Ho Cheung<br><a href="mailto:hocheung20@gmail.com" target="_blank">hocheung20@gmail.com</a><br>Cell: <a href="tel:%28775%29%20388-2368" value="+17753882368" target="_blank">(775) 388-2368</a></div>

</div>
<br><br><div class="gmail_quote">On Fri, Jun 14, 2013 at 8:44 AM, barbababa <span dir="ltr">&lt;<a href="mailto:tonimuusimaki@gmail.com" target="_blank">tonimuusimaki@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<br>
<br>
Hi!<br>
<br>
i am only using cmakelists.txt file with cmake. That was just an example<br>
that someone else is using the .pro<br>
file. and that there is also that &quot;l&quot; issue.<br>
<br>
Anyways....<br>
<br>
I changed the cmakelists.txt<br>
<br>
<br>
PROJECT(DMITK)<br>
<br>
SET(DMITK CMAKE_CXX_FLAGS_RELEASE)  # i want only release build. this does<br>
not help though<br>
<br>
 INCLUDE_DIRECTORIES( C:/ITK/build/lib/Release )<br>
 INCLUDE_DIRECTORIES( C:/ProgramData/Gatan/DMSDK/lib/x64 )<br>
<div><br>
find_package(ITK REQUIRED)<br>
include(${ITK_USE_FILE})<br>
<br>
<br>
</div>ADD_LIBRARY(DMITK SHARED<br>
.<br>
.<br>
.)<br>
<br>
<br>
TARGET_LINK_LIBRARIES(DMITK ${ITK_LIBRARIES} DMPlugInBasic.lib<br>
Foundation.lib )<br>
LINK_LIBRARIES(${ITK_LIBRARIES} DMPlugInBasic.lib Foundation.lib)<br>
<br>
<br>
And everything seems to be included.<br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://itk-insight-users.2283740.n2.nabble.com/strange-linking-problem-tp7583295p7583314.html" target="_blank">http://itk-insight-users.2283740.n2.nabble.com/strange-linking-problem-tp7583295p7583314.html</a><br>



<div>Sent from the ITK Insight Users mailing list archive at Nabble.com.<br>
</div><div><div>_____________________________________<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>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</div></div></blockquote></div><br></div></div>