[CMake] CMAKE -- compiling questions

Michael Wild themiwi at gmail.com
Wed May 26 01:51:13 EDT 2010


On 26. May, 2010, at 24:56 , Michael Hertling wrote:

> On 05/26/2010 12:34 AM, Lucian Goron wrote:
>> Back to square one !
>> I solved all the VTK problems, and now it gives me the same error as in the
>> beginning.
>> 
>> goron at schwarz:~/work/ransac/build$ make
>> Linking CXX executable coloredElevationMap
>> CMakeFiles/coloredElevationMap.dir/home/goron/work/common/CommonVTKRoutines.cc.o:
>> In function `Create2xRenderWindowAndInteractorMovie(vtkRenderer*,
>> vtkRenderer*, char const*, char const*, int, int, int)':
>> CommonVTKRoutines.cc:(.text+0xa720): undefined reference to
>> `vtkFFMPEGWriter::New()'
>> CMakeFiles/coloredElevationMap.dir/home/goron/work/common/CommonVTKRoutines.cc.o:
>> In function `Create4xRenderWindowAndInteractorMovie(vtkRenderer*,
>> vtkRenderer*, vtkRenderer*, vtkRenderer*, char const*, char const*, int,
>> int, int)':
>> CommonVTKRoutines.cc:(.text+0xad84): undefined reference to
>> `vtkFFMPEGWriter::New()'
>> CMakeFiles/coloredElevationMap.dir/home/goron/work/common/CommonVTKRoutines.cc.o:
>> In function `CreateRenderWindowAndInteractorMovie(vtkRenderer*, char const*,
>> char const*, int, int, int)':
>> CommonVTKRoutines.cc:(.text+0xb6e3): undefined reference to
>> `vtkFFMPEGWriter::New()'
>> collect2: ld returned 1 exit status
>> make[2]: *** [coloredElevationMap] Error 1
>> make[1]: *** [CMakeFiles/coloredElevationMap.dir/all] Error 2
>> make: *** [all] Error 2
>> goron at schwarz:~/work/ransac/build$
>> 
>> Yet again the error itself is not important, but the
>> 
>> (.text+0xa720)
>> (.text+0xad84)
>> (.text+0xb6e3)
>> 
>> are ! wasn't it supposed to show me the line number where the error occurs
>> in
>> 
>> /home/lucian/work/common/CommonVTKRoutines.cc
>> 
>> how can I see the line numbers ?
>> 
>> 
>> 
>> Michael, thank you for your advice. So for I did this
>> 
>> goron at schwarz:~/work/ransac/build$ cmake .
>> -- Configuring done
>> -- Generating done
>> -- Build files have been written to: /home/goron/work/ransac/build
>> goron at schwarz:~/work/ransac/build$
>> 
>> but the end result is the same. It still won't show me the line numbers were
>> the error occurs in
>> 
>> /home/lucian/work/common/CommonVTKRoutines.cc
> 
> Try the following:
> 
> goron at schwarz:~/work/ransac/build$ cmake -DCMAKE_BUILD_TYPE=debug .
> [...]                                    ^^^^^^^^^^^^^^^^^^^^^^^^
> goron at schwarz:~/work/ransac/build$ make VERBOSE=1
> 
> This should enable the "-g" option when compiling which, in turn,
> results in line numbers for unresolvable references at link time.
> 
> Regards,
> 
> Michael


Before you do this, do (be careful not to delete anything you need!)

goron at schwarz:~/$ cd ~/work/ransac/build
goron at schwarz:~/work/ransac/build$ rm -rf


to get rid of all old stuff possibly polluting your build tree.

Michael


More information about the CMake mailing list