2009/6/10 Ángel Alonso <[email protected]>:
> Hi,
>
> I'm using cmake for a project that embed Python in  C.
>
> For include the Python libs i use: include(FindPythonLibs)

One usually do:

find_package(PythonLibs)
instead of:
include(FindPythonLibs)

>
> But compiling, I get this errors:
>
> /usr/lib/python2.6/config/libpython2.6.a(posixmodule.o): In function
> `posix_tmpnam':
> (.text+0x8f4): warning: the use of `tmpnam_r' is dangerous, better use
[...]


include(FindPythonLibs) may not be enough:
you seem to be missing something like:

target_link_library(<your_target> ${PYTHON_LIBRARIES})

[...]

>
> I also try include(FindThreads) but the problem persist.

Same for FindThreads.

find_package(Threads)

however I dont' know that one works because the FindThreads.cmake
module does not seem to define THREADS_LIBRARIES
in order for you to
target_link_library(<your_target> ${THREADS_LIBRARIES})

May be the author of FindThreads may help us with the usage of this module?

> I think that is a problem of cmake, because in other tests that I made (with
> a simple Makefile, not cmake) it works.

compare the link command used by CMake and te one you use in your makefile.

make VERBOSE=1

with CMake generated makefile should show you the full link line.


-- 
Erk
_______________________________________________
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