[CMake] how to write a cmakelist to call a function in another c or cxx file

C. Meissa carsten.meissa at gmx.de
Sat Jan 16 10:57:45 EST 2010


Hello Liu,

> However, after ccmake and then make, I got the error:
> main.cxx:(.text+0x10a): undefined reference to `func()'
> collect2: ld returned 1 exit status

Can you put
SET (CMAKE_VERBOSE_MAKEFILE TRUE)
to your CMakeLists.txt to check what compiler command is run?

bye
C.M.


More information about the CMake mailing list