[CMake] [CMAKE] setting list with different directories ?

Maxime Lecourt maxime.lecourt at gmail.com
Wed Jun 1 07:32:29 EDT 2011


Problem solved.
The problem with linking with the C++ lib comes from C++ lib, and has
nothing to do with CMake

Thanks.

2011/6/1 Hendrik Sattler <post at hendrik-sattler.de>

> Zitat von Maxime Lecourt <maxime.lecourt at gmail.com>:
>
>  The declarations in my_c_header.h are surrounded by
>>
>> #if defined(__cplusplus)
>>    extern  "C" {
>> #endif
>> // functions and stuff declarations
>> #if defined(__cplusplus)
>>    }
>> #endif
>>
>> So i'm not sure about whether it's taken into account or not, and how to
>> have CMake take it into account when I compile my library as C.
>>
>
> This should work, the definition is automatically set by the C++ compiler
> and unset for the C compiler.
> Are the "undefined references" actually symbols in your C files? Did you
> turn all warnings on (suggested) with -Wall -Wextra?
>
> The problem with compile C as C++ is that those are actually two different
> languages. It may work but the result will not always be the same.
>
> HS
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110601/a3e36e42/attachment.htm>


More information about the CMake mailing list