<br>Hi Boris,<br><br>Have you verified that there is indeed a file <br><br>                     libITKCommon.a<br> <br>in the &quot;bin&quot; subdirectory of the binary directory <br>where you build ITK ?<br><br>Also, <br>
<br>Did you used Shared libraries when you build ITK ?<br><br>(if so, you may want to change that build to use<br>static libraries).<br><br><br>Please let us know what you find.<br><br><br>      Thanks<br><br><br>            Luis<br>
<br><br><br>-----------------------------------------------------<br><div class="gmail_quote">On Mon, Apr 12, 2010 at 8:06 PM, Boris Shabash <span dir="ltr">&lt;<a href="mailto:bshabash@hotmail.com">bshabash@hotmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Used<br>
make VERBOSE=1<br>
<br>
and got the following:<br>
<br>
/usr/local/bin/cmake<br>
-H/Users/borisshabash/Desktop/School/CMPT/888/project/ITK_Assignment/ReadProcesssWrtieFolder<br>
-B/Users/borisshabash/Desktop/School/CMPT/888/project/ITK_Assignment/ReadProcesssWrtieFolder<br>
--check-build-system CMakeFiles/Makefile.cmake 0<br>
/usr/local/bin/cmake -E cmake_progress_start<br>
/Users/borisshabash/Desktop/School/CMPT/888/project/ITK_Assignment/ReadProcesssWrtieFolder/CMakeFiles<br>
/Users/borisshabash/Desktop/School/CMPT/888/project/ITK_Assignment/ReadProcesssWrtieFolder/CMakeFiles/progress.make<br>
make -f CMakeFiles/Makefile2 all<br>
make -f CMakeFiles/ReadProcessWrite.dir/build.make<br>
CMakeFiles/ReadProcessWrite.dir/depend<br>
cd<br>
/Users/borisshabash/Desktop/School/CMPT/888/project/ITK_Assignment/ReadProcesssWrtieFolder<br>
&amp;&amp; /usr/local/bin/cmake -E cmake_depends &quot;Unix Makefiles&quot;<br>
/Users/borisshabash/Desktop/School/CMPT/888/project/ITK_Assignment/ReadProcesssWrtieFolder<br>
/Users/borisshabash/Desktop/School/CMPT/888/project/ITK_Assignment/ReadProcesssWrtieFolder<br>
/Users/borisshabash/Desktop/School/CMPT/888/project/ITK_Assignment/ReadProcesssWrtieFolder<br>
/Users/borisshabash/Desktop/School/CMPT/888/project/ITK_Assignment/ReadProcesssWrtieFolder<br>
/Users/borisshabash/Desktop/School/CMPT/888/project/ITK_Assignment/ReadProcesssWrtieFolder/CMakeFiles/ReadProcessWrite.dir/DependInfo.cmake<br>
--color=<br>
make -f CMakeFiles/ReadProcessWrite.dir/build.make<br>
CMakeFiles/ReadProcessWrite.dir/build<br>
Linking CXX executable ReadProcessWrite<br>
/usr/local/bin/cmake -E cmake_link_script<br>
CMakeFiles/ReadProcessWrite.dir/link.txt --verbose=1<br>
/usr/bin/g++     -ftemplate-depth-50 -Wall -Wno-deprecated -no-cpp-precomp<br>
-Wno-long-double -Wl,-search_paths_first -headerpad_max_install_names -fPIC<br>
CMakeFiles/ReadProcessWrite.dir/ReadProcessWrite.o  -o ReadProcessWrite<br>
-L/Users/borisshabash/Desktop/School/CMPT/888/project/itkXcodeBuild/bin<br>
-lITKCommon -litkvnl_inst -litkvnl_algo -litkv3p_netlib -litkvnl -litkvcl<br>
-lm -litksys -lpthread -lm<br>
<div class="im">ld: library not found for -lITKCommon<br>
collect2: ld returned 1 exit status<br>
</div>make[2]: *** [ReadProcessWrite] Error 1<br>
make[1]: *** [CMakeFiles/ReadProcessWrite.dir/all] Error 2<br>
make: *** [all] Error 2<br>
<br>
any insight?<br>
<div><div></div><div class="h5"><br>
<br>
<br>
Boris Shabash wrote:<br>
&gt;<br>
&gt; Hello everyone<br>
&gt;<br>
&gt; I am currently working on a class project requiring ITK. I created the<br>
&gt; binary using cmake and am working with the first example.<br>
&gt;<br>
&gt; I created a folder called &quot;HelloWorldFolder&quot; on my mac and inside created<br>
&gt; a CmakeLists.txt file with the following:<br>
&gt; PROJECT(HelloWorld)<br>
&gt;<br>
&gt; FIND_PACKAGE(ITK)<br>
&gt; IF (ITK_FOUND)<br>
&gt;       INCLUDE(${ITK_USE_FILE})<br>
&gt; ELSE(ITK_FOUND)<br>
&gt;       MESSAGE(FATAL_ERROR<br>
&gt;                         &quot;ITK not found. Please set ITK_DIR.&quot;)<br>
&gt; ENDIF(ITK_FOUND)<br>
&gt;<br>
&gt; ADD_EXECUTABLE(HelloWorld HelloWorld.cxx)<br>
&gt;<br>
&gt; TARGET_LINK_LIBRARIES(HelloWorld ITKCommon)<br>
&gt;<br>
&gt;<br>
&gt; I also created a file called HelloWorld.cxx and in it I wrote:<br>
&gt; #include &quot;itkImage.h&quot;<br>
&gt; #include &lt;iostream&gt;<br>
&gt;<br>
&gt; int main()<br>
&gt; {<br>
&gt;       typedef itk::Image&lt;unsigned short, 3&gt; ImageType;<br>
&gt;<br>
&gt;       ImageType::Pointer image = ImageType::New();<br>
&gt;<br>
&gt;       std::cout&lt;&lt;&quot;ITK HELLOW WORLD!&quot;&lt;&lt;std::endl;<br>
&gt;<br>
&gt;       return 0;<br>
&gt; }<br>
&gt;<br>
&gt;<br>
&gt; Then I type &quot;ccmake .&quot; in the folder and do all the configurations, then I<br>
&gt; type &quot;make&quot; and get the following error:<br>
&gt;<br>
&gt; Scanning dependencies of target HelloWorld<br>
&gt; [100%] Building CXX object CMakeFiles/HelloWorld.dir/HelloWorld.o<br>
&gt; Linking CXX executable HelloWorld<br>
&gt; ld: library not found for -lITKCommon<br>
&gt; collect2: ld returned 1 exit status<br>
&gt; make[2]: *** [HelloWorld] Error 1<br>
&gt; make[1]: *** [CMakeFiles/HelloWorld.dir/all] Error 2<br>
&gt; make: *** [all] Error 2<br>
&gt;<br>
&gt; What do I have to do to have the compiler find the ITKCommon library?<br>
&gt;<br>
<br>
--<br>
</div></div>View this message in context: <a href="http://old.nabble.com/Noob-question%2C-but-I-have-to-tp28219187p28219202.html" target="_blank">http://old.nabble.com/Noob-question%2C-but-I-have-to-tp28219187p28219202.html</a><br>

<div><div></div><div class="h5">Sent from the ITK - Users mailing list archive at Nabble.com.<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<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.html" target="_blank">http://www.kitware.com/products/protraining.html</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>