Cmake external Dependency configuration -
i have sdk robotic device called (falcon haptic device), , trying to compile simple example provided company want set linking , dependency configuration using cmake.
on disk have flowing files
sdk
include
- dhdc.h
- drdc.h
lib
- dhdms.lib
- dhdms64.lib
- drdms.lib
- drdms64.lib
and in different directory have project call "mmt"
- mmt
- mmt.cpp
- include
- dhdc.h
- drdc.h
- cmakelists.txt
- build
and have following cmakelists
cmake_minimum_required(version 2.6 fatal_error) project(mmt) include_directories(include) add_library(foo static imported) add_library(fop static imported) set_property(target foo property imported_location "c:/program files/force dimension/sdk-3.5.1/lib/dhdms.lib") set_property(target fop property imported_location "c:/program files/force dimension/sdk-3.5.1/lib/drdms.lib") add_executable(myexe mmt.cpp) target_link_libraries(myexe foo fop )
i succeeded in generating .sln file , when open it doesn't have compelling error ... when run getting run time error saying "the apllication not able start correctly 0xc000007b ". given code (mmt.cpp) works fine when run provided .sln file company on 32 , 64 platforms... missing in cmakelists.txt ?
i solved problem. turned out there no problem cmakelist.txt. way solve problem before generation stage cmake asks chose generator choosing (visual studio 10 2010) instead must have used (visual studio 10 2010 win64). note need link against hdhms64.lib if chose option.
Comments
Post a Comment