[CMake] [Cmake/SWIG/JAVA/WINDOWS] add -Wl,--kill-at flag
Hi everybody, I use CMake to wrap a c++ library in Java with swig. When I use linux OS it works very well, but when I use windows OS there is a problem. Indeed, the compilation works fine but the dll has not the correct method/fonction inside. After several researches on the web I find I must use the flag -Wl,--kill-at when I create the dll. But I do not find the equivalent flag on cmake, I try: CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS CMAKE_SHARED_LIBRARY_CXX_FLAGS CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP CMAKE_SHARED_LIBRARY_LINK_STATIC_CXX_FLAGS CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_CXX_FLAGS Does somebody know a solution? Thanks Benjamin JEANTY-RUARD ___ 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
Re: [CMake] [Cmake/SWIG/JAVA/WINDOWS] add -Wl,--kill-at flag
Are you sure you don't just need an: extern C { } block around a function implemented in a C++ file...? On Thu, Aug 4, 2011 at 7:30 AM, Benjamin Ruard ru...@artenum.com wrote: Hi everybody, I use CMake to wrap a c++ library in Java with swig. When I use linux OS it works very well, but when I use windows OS there is a problem. Indeed, the compilation works fine but the dll has not the correct method/fonction inside. After several researches on the web I find I must use the flag -Wl,--kill-at when I create the dll. But I do not find the equivalent flag on cmake, I try: CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS CMAKE_SHARED_LIBRARY_CXX_FLAGS CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP CMAKE_SHARED_LIBRARY_LINK_STATIC_CXX_FLAGS CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_CXX_FLAGS Does somebody know a solution? Thanks Benjamin JEANTY-RUARD ___ 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 ___ 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
Re: [CMake] [Cmake/SWIG/JAVA/WINDOWS] add -Wl,--kill-at flag
Thanks for your answer, but The block: extern C { ... } already exists. Regards. Benjamin JEANTY-RUARD Le jeudi 04 août 2011 à 08:40 -0400, David Cole a écrit : Are you sure you don't just need an: extern C { } block around a function implemented in a C++ file...? On Thu, Aug 4, 2011 at 7:30 AM, Benjamin Ruard ru...@artenum.com wrote: Hi everybody, I use CMake to wrap a c++ library in Java with swig. When I use linux OS it works very well, but when I use windows OS there is a problem. Indeed, the compilation works fine but the dll has not the correct method/fonction inside. After several researches on the web I find I must use the flag -Wl,--kill-at when I create the dll. But I do not find the equivalent flag on cmake, I try: CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS CMAKE_SHARED_LIBRARY_CXX_FLAGS CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP CMAKE_SHARED_LIBRARY_LINK_STATIC_CXX_FLAGS CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_CXX_FLAGS Does somebody know a solution? Thanks Benjamin JEANTY-RUARD ___ 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 ___ 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