c++ - my QT designer plugin does not find externals -


i built qt designer custom plugin works fine..until add header not in same library...

if add mtbfwidget.cpp/.h :

#include "kinecthandler.h" 

the plugin not found anymore. if delete it, works..this tells me cannot find externals. stuck @ moment , appreciate in every form.. think problem might cmakelists.txt, tells how build dll/lib..here cmakelists.txt :

    ########### client library ###############       find_package( qt4 components qtcore qtgui qtopengl required )     include( ${qt_use_file} )     link_libraries( ${qt_libraries} )      set (client_sources  client.cpp                          mtbf.cpp                          pose.cpp                          mtbfreader.cpp                          kinecthandler.cpp )      set (client_headers ${project_source_dir}/include/client.h                          ${project_source_dir}/include/mtbf.h                         ${project_source_dir}/include/pose.h                         ${project_source_dir}/include/mtbfreader.h                         ${project_source_dir}/include/kinecthandler.h                         )      add_library(client shared  ${client_sources} ${client_headers} ${client_moc_src} ${uisrcs})      target_link_libraries(client ${qt_libraries} ${boost_libraries} ${odysseus_libraries})      ###########################qt designer plugin ###################      set (plugin_moc_h ${project_source_dir}/include/mtbfwidgetplugin.h                        ${project_source_dir}/include/mtbfwidget.h)      set (plugin_srcs mtbfwidgetplugin.cpp                       mtbfwidget.cpp)      include_directories(${project_source_dir}/include                         ${qt_qtdesigner_include_dir} )      qt4_wrap_cpp( mocsrc ${plugin_moc_h} )      add_library(mtbf_plugin shared  ${mocsrc}  ${plugin_moc_h} ${plugin_srcs} )      add_dependencies(mtbf_plugin client )      set_target_properties(mtbf_plugin properties compile_flags "${qt_definitions} -dqdesigner_export_widgets -dqt_plugin -dqt_no_debug -dqt_shared")      target_link_libraries(mtbf_plugin ${qt_libraries} client ${boost_libraries} ${odysseus_libraries})      set( qt_plugin_path $env{qt_plugin_path} )     if( qt_plugin_path )         get_target_property( tmp_library_path mtbf_plugin location )         add_custom_command( target mtbf_plugin post_build command ${cmake_command} args -e copy ${tmp_library_path} ${qt_plugin_path}/designer )     endif( qt_plugin_path ) 

edit :

any qt related include works. every other include outside not

works :

#include "qtgui\qabstractbutton.h" 

does not work :

#include "boost\thread.hpp" 

the strange thing is, program can find files, compiles correctly..

finally....i found solution..if anyone has problem :

you need copy external dependencies ( in case boost dlls ) qt/x.x.x/bin folder

to solve me : c:\qt\4.8.4\bin\boost_system-vc100-mt-1_52.dll needs exist.

what finding dependencies : download dependency checker, see .dll needed, , drop qt bin folder.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -