Hy guy, I'm building a project using 2 libraries:
x7scv -> which integrate opencv (dynamically) and libjpeg (statically) x7sxml -> which integrate tinxml (statically) The problem is that when i create a program that use theses 2 libraries: SET(X7S_LIBRARIES "x7snet" "x7scv" "x7sxml") include_directories(${X7S_INCLUDES} ${OPENCV_INCLUDE_DIR}) add_dependencies(my_prog ${X7S_LIBRARIES}) target_link_libraries(my_prog ${X7S_LIBRARIES} ${OPENCV_LIBRARIES}) I've the following line at GCC: ..\x7s\src\x7scv\libx7scv.dll.a ..\x7s\src\x7sxml\libx7sxml.dll.a "C:\Archivos de programa\OpenCV\lib\cv.lib" "C:\Archivos de programa\OpenCV\lib\cxcore.lib" "C:\Archivos de programa\OpenCV\lib\cvaux.lib" "C:\Archivos de programa\OpenCV\lib\highgui.lib" ..\3rdparty\lib\liblibjpeg.a ..\3rdparty\lib\libtinyxml.a And i don't know why it link also with the static library ..\3rdparty\lib\liblibjpeg.a ..\3rdparty\lib\libtinyxml.a because they have already been linked in ..\x7s\src\x7scv\libx7scv.dll.a ..\x7s\src\x7sxml\libx7sxml.dll.a So I've a "multiple definition of ..." error. PS: The library x7sxml is created like this: set(LIBNAME "x7sxml") add_library(${LIBNAME} ${SRC_FILES} ${HDR_FILES}) target_link_libraries(${LIBNAME} "D:/projects/builds/CvS400/ec_mingw/3rdparty/lib/libtinyxml.a") thanks!!!! -- Benoit RAT www.neub.co.nr
_______________________________________________ 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