[CMake] CMAKE -- compiling questions

Michael Wild themiwi at gmail.com
Thu May 20 05:04:17 EDT 2010


On 20. May, 2010, at 10:58 , 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 ?
> 
> 
> 
> -- 
> MSc., Eng. Lucian GORON, PhD. Student
> Robotic Research Group, Technical University of Cluj-Napoca
> 71-73 Dorobantilor Street, Room C24, 400609 Cluj-Napoca, Romania
> 0040 264 401267 (office), 0040 727 361624 (mobile)
> lucian.goron at aut.utcluj.ro
> rrg.utcluj.ro

Did you do this with an old build tree? I.e. created it under Ubuntu 9.10, compiled, upgraded Ubuntu to 10.04 and now try to compile again? In that case my advice is to start from a fresh build tree... Probably the name-mangling scheme of your compiler changed and now linking fails because the new compiler can't cope with the symbol names created by the old compiler when writing the object files.

Michael



More information about the CMake mailing list