<br>Hi Boris,<br><br>Have you verified that there is indeed a file <br><br> libITKCommon.a<br> <br>in the "bin" 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"><<a href="mailto:bshabash@hotmail.com">bshabash@hotmail.com</a>></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>
&& /usr/local/bin/cmake -E cmake_depends "Unix Makefiles"<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>
><br>
> Hello everyone<br>
><br>
> I am currently working on a class project requiring ITK. I created the<br>
> binary using cmake and am working with the first example.<br>
><br>
> I created a folder called "HelloWorldFolder" on my mac and inside created<br>
> a CmakeLists.txt file with the following:<br>
> PROJECT(HelloWorld)<br>
><br>
> FIND_PACKAGE(ITK)<br>
> IF (ITK_FOUND)<br>
> INCLUDE(${ITK_USE_FILE})<br>
> ELSE(ITK_FOUND)<br>
> MESSAGE(FATAL_ERROR<br>
> "ITK not found. Please set ITK_DIR.")<br>
> ENDIF(ITK_FOUND)<br>
><br>
> ADD_EXECUTABLE(HelloWorld HelloWorld.cxx)<br>
><br>
> TARGET_LINK_LIBRARIES(HelloWorld ITKCommon)<br>
><br>
><br>
> I also created a file called HelloWorld.cxx and in it I wrote:<br>
> #include "itkImage.h"<br>
> #include <iostream><br>
><br>
> int main()<br>
> {<br>
> typedef itk::Image<unsigned short, 3> ImageType;<br>
><br>
> ImageType::Pointer image = ImageType::New();<br>
><br>
> std::cout<<"ITK HELLOW WORLD!"<<std::endl;<br>
><br>
> return 0;<br>
> }<br>
><br>
><br>
> Then I type "ccmake ." in the folder and do all the configurations, then I<br>
> type "make" and get the following error:<br>
><br>
> Scanning dependencies of target HelloWorld<br>
> [100%] Building CXX object CMakeFiles/HelloWorld.dir/HelloWorld.o<br>
> Linking CXX executable HelloWorld<br>
> ld: library not found for -lITKCommon<br>
> collect2: ld returned 1 exit status<br>
> make[2]: *** [HelloWorld] Error 1<br>
> make[1]: *** [CMakeFiles/HelloWorld.dir/all] Error 2<br>
> make: *** [all] Error 2<br>
><br>
> What do I have to do to have the compiler find the ITKCommon library?<br>
><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>