Hello,<br><br>I've a problem when using libraries under MS Visual C++ 2008 Express Edition but it works fine with GCC and MinGW.<br><br>I have first create a core (cv7core) library that compile correctly (I obtain cv7core.dll), however I doesn't create the static lib.<br>
Then I create another library that use the first one but it doesn't compile because it doesn't find the cv7core.lib:<br><br>LINK : fatal error LNK1104: no se puede abrir el archivo '..\cv7core\Debug\cv7core.lib'<br>
<br>My CmakeLists.txt have the following interesant part:<br><br><br>------------------------------------------------------------------------------<br><i>./CmakeLists.txt:</i><br>------------------------------------------------------------------------------<br>
...<br>## On DLL platform put also *.dll<br>SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY<br> ${PROJECT_INSTALL_PATH}/bin<br> CACHE PATH<br> "Single Directory for all Executables and DLL."<br>)<br><br>## Otherwise put library in lib folder.<br>
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY<br> ${PROJECT_INSTALL_PATH}/lib<br> CACHE PATH<br> "Single Directory for all Libraries"<br>)<br>...<br><br><br>------------------------------------------------------------------------------<br>
<i>./src/cv7core/CmakeLists.txt:</i><br>------------------------------------------------------------------------------<br>set(LIBNAME "cv7core")<br clear="all">set(SRC_FILES cv7BGModel.c cv7ConCompo.c ...)<br>
include_directories(${OpenCV_INCLUDE_DIRS})<br>
include_directories(${PROJECT_SOURCE_DIR}/include/${LIBNAME})<br><br># change lib_target properties<br>SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES<br>VERSION ${${PROJECT_NAME}_MINOR_VERSION}<br>SOVERSION ${${PROJECT_NAME}_MINOR_VERSION}<br>
#CLEAN_DIRECT_OUTPUT 1 # avoid conflicts between library and binary target names<br>#OUTPUT_NAME ${LIBNAME} # allow creating static and shared libs without conflicts<br>)<br><br><br>It is maybe a very stupid things but i'm not microsoft friendly and it is the first time i use the MSVC compilator<br>
<br>--<br>Benoit RAT<br><a href="http://www.neub.co.nr">www.neub.co.nr</a><br>