From: Brendan M. <bre...@gm...> - 2008-01-08 20:02:04
|
If you go to the directory /home/agrawala/vxl-1.9/bin/core/examples/vnl_calc there will be an executable in there called vnl_calc - this should have been already compiled since you say the compilation process worked fine. There is a clear separation between the source and binary directories and it's usually best to keep them separate. So you shouldn't need to make in a source directory. To turn on VGUI, go to your bin directory do: ccmake ../vxl-1.9.0 Scroll down until you see the option BUILD_VGUI, turn it on, then configure, then generate, then make again. To create your own source code/CMakeLists.txt, I'd suggest having a look at the vxl book which goes through the whole process. On 09/01/2008, Agrawal Ashish <agr...@st...> wrote: > Hi, > > Yes. All the examples have been compiled successfully as the result of original make. I thought to compile myself few examples for eg. ~/vxl-1.9/vxl-1.9.0/core/examples/vnl_calc. So I just executed "cmake CMakeLists.txt " in this directory which results in creating Makefile. Then I executed make in the same directory which ends up with compilation error: > > > Scanning dependencies of target time_fastops > [ 11%] Building CXX object CMakeFiles/time_fastops.dir/time_fastops.o > /home/agrawala/vxl-1.9/vxl-1.9.0/core/vnl/examples/time_fastops.cxx:2:26: error: vcl_iostream.h: No such file or directory > /home/agrawala/vxl-1.9/vxl-1.9.0/core/vnl/examples/time_fastops.cxx:3:41: error: vcl_cmath.h: No such file or directory > /home/agrawala/vxl-1.9/vxl-1.9.0/core/vnl/examples/time_fastops.cxx:4:24: error: vcl_vector.h: No such file or directory > /home/agrawala/vxl-1.9/vxl-1.9.0/core/vnl/examples/time_fastops.cxx:5:27: error: vul/vul_timer.h: No such file or directory > /home/agrawala/vxl-1.9/vxl-1.9.0/core/vnl/examples/time_fastops.cxx: In function 'int main()': > /home/agrawala/vxl-1.9/vxl-1.9.0/core/vnl/examples/time_fastops.cxx:21: error: 'vcl_vector' was not declared in this scope > /home/agrawala/vxl-1.9/vxl-1.9.0/core/vnl/examples/time_fastops.cxx:21: error: expected primary-expression before 'double' > /home/agrawala/vxl-1.9/vxl-1.9.0/core/vnl/examples/time_fastops.cxx:21: error: expected `;' before 'double' > /home/agrawala/vxl-1.9/vxl-1.9.0/core/vnl/examples/time_fastops.cxx:23: error: 'x' was not declared in this scope > /home/agrawala/vxl-1.9/vxl-1.9.0/core/vnl/examples/time_fastops.cxx:23: error: 'y' was not declared in this scope > /home/agrawala/vxl-1.9/vxl-1.9.0/core/vnl/examples/time_fastops.cxx:23: error: 'vcl_sqrt' was not declared in this scope > /home/agrawala/vxl-1.9/vxl-1.9.0/core/vnl/examples/time_fastops.cxx:25: error: 'vul_timer' was not declared in this scope > /home/agrawala/vxl-1.9/vxl-1.9.0/core/vnl/examples/time_fastops.cxx:25: error: expected `;' before 't' > /home/agrawala/vxl-1.9/vxl-1.9.0/core/vnl/examples/time_fastops.cxx:27: error: 'x' was not declared in this scope > /home/agrawala/vxl-1.9/vxl-1.9.0/core/vnl/examples/time_fastops.cxx:27: error: 'y' was not declared in this scope > /home/agrawala/vxl-1.9/vxl-1.9.0/core/vnl/examples/time_fastops.cxx:28: error: 'vcl_cerr' was not declared in this scope > /home/agrawala/vxl-1.9/vxl-1.9.0/core/vnl/examples/time_fastops.cxx:29: error: 'x' was not declared in this scope > /home/agrawala/vxl-1.9/vxl-1.9.0/core/vnl/examples/time_fastops.cxx:29: error: 'y' was not declared in this scope > /home/agrawala/vxl-1.9/vxl-1.9.0/core/vnl/examples/time_fastops.cxx:30: error: 't' was not declared in this scope > make[2]: *** [CMakeFiles/time_fastops.dir/time_fastops.o] Error 1 > make[1]: *** [CMakeFiles/time_fastops.dir/all] Error 2 > make: *** [all] Error 2 > > > To get them compiled I need to edit the automatically generated makefile and providing the include file path with -I option. But then I ended up with linking errors those I sent in my previous mail. > > My question is where I should write my own code and how to configure my CmakeLists.txt so that it can recognize all the paths and libraries files needed. > > My lack of knowledge in Cmake system might be another reason for this ignorance. > > > Thanks, > Ashish > > > -----Original Message----- > From: Brendan McCane [mailto:bre...@gm...] > Sent: Mon 1/7/2008 9:03 PM > To: Agrawal Ashish > Cc: vxl...@li... > Subject: Re: [Vxl-users] Very first make > > Hi Ashish, > > So, your directory structure is: > > Source: > ~/vxl-1.9/vxl-1.9.0 > > Binary: > ~/vxl-1.9/bin > > and you did: > cd ~/vxl-1.9/bin > cmake ../vxl-1.9.0 > make > ctest > > and that worked fine? > > > Now I am trying to run the first program which is example program residing in ~/vxl-1.9/vxl-1.9.0/core/examples/vnl_calc. While make-ing the program it terminated mentioning vcl_cstdlib.h: No such file or directory and did the same for all included files. > > Here I get a bit confused. If the original make had succeeded, that > example should have been compiled already - unless you turned off > examples in cmake. So can you please explain exactly what you did and > exactly what the output was (ie copy and paste the output of the > compiler). If you haven't already done so, you should probably turn on > the CMAKE_VERBOSE_MAKEFILE option in cmake - if you use ccmake, then > you need to toggle advanced mode first. > > -- > Cheers, > > Brendan > > -- Cheers, Brendan |