Adding Dependent Dll to the NPAPI plugin project using CMake in Firebreath -
the plugin has call functions in external dependent dll file. followed tutorial , did following still no success.
i have pasted sample.dll file @ project root.
i have added following configuration projectdef.cmake (projects\plugintest\win\projectdef.cmake):
set (library_path "${cmake_current_source_dir}/sample.dll") target_link_libraries(${project_name} debug "${library_path}/debug/sample.dll") target_link_libraries(${project_name} optimized "${sandstone_dir}/release/sample.dll")
i generated solution file using "firebreath\prep2010.cmd projects build"
- the generated firebreath solution's project properties->configuration properties->linker->input->additional dependecies has appropriate absolute path of dll.
i added following in plugintestapi.cpp:
include "sample.h"
build errors:
cannot open include file "sample.h" : no such file or directory.
the dll file package of header file , lib file. able make calls dll using jna.
i java developer , don't have experience in c++ programming. believe missing fundamental.
thanks!
the main thing need understand you're missing here don't link dll; instead, link .lib file goes dll , loading of dll behind scenes. wherever you're building dependent dll you'll find there .lib file; specify link target in target_link_libraries.
next if want open include file "sample.h" you'll need add path sample.h include directories using cmake include_directories command.
i suspect it's typo, have specified sample.dll twice; once in library_path, , once in target_link_libraries call. that's not going work, since it'll cause try link ${cmake_current_source_dir}/sample.dll/debug/sample.dll
when else fails open project properties in visual studio (since that's you're using) , @ libraries , include directories there are; understand cmake doing.
hope helps!
Comments
Post a Comment