Zitat von Maxime Lecourt <[email protected]>:
I'm having what is probably a newbie problem, but a problem to me.

I have C source files in two different directories, that I use to build a
dll, that is loaded by another C++ project.

I tried to build C objects and link with C++
set_target_properties(ppc PROPERTIES LINK_FLAGS "-Wl,--kill-at"
LINKER_LANGUAGE "CXX")
but I have linker problem (undefined references) when trying to link my C++
project.

So I decided to build my library as C++ and not C.

Known problem but wrong decision. If your library is C, then compile it as C, not as C++. Your real problem is that you probably forgot the
extern "C" {
#include "my_c_header.h"
}
lines for inclusion of the C header files.

HS



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to