[CMake] CMAKE -- compiling questions

Michael Hertling mhertling at online.de
Thu May 20 08:48:04 EDT 2010


On 05/20/2010 10:58 AM, Lucian Goron wrote:
> I now have lucid lynx and I am struggling to get my old code to work on this
> system
> anyway, when I compile some of it I get:
> 
> lucian at schwarz:~/work/ransac$ make
> Linking CXX executable elevationMap
> CMakeFiles/elevationMap.dir/home/lucian/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/elevationMap.dir/home/lucian/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/elevationMap.dir/home/lucian/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]: *** [elevationMap] Error 1
> make[1]: *** [CMakeFiles/elevationMap.dir/all] Error 2
> make: *** [all] Error 2
> lucian at schwarz:~/work/ransac$
> 
> I know, I have a problem with the ffmpeg library...
> But my questions is, in someway very stupid, related to the
> 
> (.text+0xa720)
> 
> part, what does it mean, 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 ?

Line number information must be enabled when compiling, e.g. by means of
GCC's option "-g". Without it, you will just get offsets into the object
code instead, like the 0xa720 above; besides, "text" is an ancient *nix
term for a memory segment containing program code, in contrast to data
segments. Typically, the "-g" option will be spefified when setting the
CMAKE_BUILD_TYPE to "Debug" or "RelWithDebInfo", but see the various
CMAKE_<LANG>_FLAGS, too.

Regards,

Michael


More information about the CMake mailing list