[Insight-users] Noob question, but I have to

Boris Shabash bshabash at hotmail.com
Mon Apr 12 20:06:31 EDT 2010


Used 
make VERBOSE=1

and got the following:

/usr/local/bin/cmake
-H/Users/borisshabash/Desktop/School/CMPT/888/project/ITK_Assignment/ReadProcesssWrtieFolder
-B/Users/borisshabash/Desktop/School/CMPT/888/project/ITK_Assignment/ReadProcesssWrtieFolder
--check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/bin/cmake -E cmake_progress_start
/Users/borisshabash/Desktop/School/CMPT/888/project/ITK_Assignment/ReadProcesssWrtieFolder/CMakeFiles
/Users/borisshabash/Desktop/School/CMPT/888/project/ITK_Assignment/ReadProcesssWrtieFolder/CMakeFiles/progress.make
make -f CMakeFiles/Makefile2 all
make -f CMakeFiles/ReadProcessWrite.dir/build.make
CMakeFiles/ReadProcessWrite.dir/depend
cd
/Users/borisshabash/Desktop/School/CMPT/888/project/ITK_Assignment/ReadProcesssWrtieFolder
&& /usr/local/bin/cmake -E cmake_depends "Unix Makefiles"
/Users/borisshabash/Desktop/School/CMPT/888/project/ITK_Assignment/ReadProcesssWrtieFolder
/Users/borisshabash/Desktop/School/CMPT/888/project/ITK_Assignment/ReadProcesssWrtieFolder
/Users/borisshabash/Desktop/School/CMPT/888/project/ITK_Assignment/ReadProcesssWrtieFolder
/Users/borisshabash/Desktop/School/CMPT/888/project/ITK_Assignment/ReadProcesssWrtieFolder
/Users/borisshabash/Desktop/School/CMPT/888/project/ITK_Assignment/ReadProcesssWrtieFolder/CMakeFiles/ReadProcessWrite.dir/DependInfo.cmake
--color=
make -f CMakeFiles/ReadProcessWrite.dir/build.make
CMakeFiles/ReadProcessWrite.dir/build
Linking CXX executable ReadProcessWrite
/usr/local/bin/cmake -E cmake_link_script
CMakeFiles/ReadProcessWrite.dir/link.txt --verbose=1
/usr/bin/g++     -ftemplate-depth-50 -Wall -Wno-deprecated -no-cpp-precomp
-Wno-long-double -Wl,-search_paths_first -headerpad_max_install_names -fPIC  
CMakeFiles/ReadProcessWrite.dir/ReadProcessWrite.o  -o ReadProcessWrite 
-L/Users/borisshabash/Desktop/School/CMPT/888/project/itkXcodeBuild/bin
-lITKCommon -litkvnl_inst -litkvnl_algo -litkv3p_netlib -litkvnl -litkvcl
-lm -litksys -lpthread -lm 
ld: library not found for -lITKCommon
collect2: ld returned 1 exit status
make[2]: *** [ReadProcessWrite] Error 1
make[1]: *** [CMakeFiles/ReadProcessWrite.dir/all] Error 2
make: *** [all] Error 2

any insight?



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

-- 
View this message in context: http://old.nabble.com/Noob-question%2C-but-I-have-to-tp28219187p28219202.html
Sent from the ITK - Users mailing list archive at Nabble.com.



More information about the Insight-users mailing list