[Insight-users] How to specify linker in cmake when mixing c/c++ ?

Feng Ma mafeng at hotmail . com
Wed, 17 Sep 2003 17:48:01 -0400


Hi,

  Another question:

  I have a C wrapper library of C++ ITK libraries. The wrapper library will 
be compiled using c++ and the calling function is c function  which will be 
compiled using gcc ( it is not easy to compile old c code using c++ 
compiler).

  The project directory only have c files. CMake compile .c files correctly. 
When generating the final executable, the linker it chose automatically is 
gcc. I could not find a place in CMake configuration screen to specify using 
c++ (g++) to generate the executable.

  I manually modified the generated Makefile to use g++ to link object files 
from C file and libraries from C++ files. It works. But it will be great if 
we can set it somewhere in CMake to tell CMake that this is a project with 
mixture of c and c++. Any ideas?

  Thanks.

-Feng

_________________________________________________________________
Use custom emotions -- try MSN Messenger 6.0! 
http://www . msnmessenger-download . com/tracking/reach_emoticon