find-object
find-object copied to clipboard
catkin_make does not find QTransform
I'm trying to add the file hello_there.cpp file to the src folder to make some workarounds. I am using the Qtransform header #include <QTransform>, so in the CMakeLists.txt I added the following lines right before the Install
include_directories(include) include_directories( ${catkin_INCLUDE_DIRS} ) add_executable(${PROJECT_NAME}_node_hello src/hello_there.cpp) target_link_libraries(${PROJECT_NAME}_node_hello ${catkin_LIBRARIES} )
when compiling, it threw the error:
hello_there.cpp:4:22: fatal error: QTransform: No such file or directory #include <QTransform>
include_directories(include) include_directories( ${catkin_INCLUDE_DIRS} ) **include_directories(/home/myself/Progr/anaconda3/include/qt/QtGui)** add_executable(${PROJECT_NAME}_node_hello src/hello_there.cpp) target_link_libraries(${PROJECT_NAME}_node_hello ${catkin_LIBRARIES} )
and afterward, when compiling, it complains now with:
/anaconda3/include/qt/QtGui/qtransform.h:36:27: fatal error: QtGui/qmatrix.h: No such file or directory #include <QtGui/qmatrix.h>
So I'm guessing it can not find the complete link to the Qt libraries.. I've tried with the header to the anaconda installation and with Qt itself:
- include_directories(/home/myself/Progr/anaconda3/include/qt/QtGui)
- include_directories(/home/myself/Progr/Qt/5.10.0/gcc_64/include/QtGui)
but none of them gives me any difference.. I think it might have something to do with the env variables, but uncertain. Can you give me some advice?
Use /home/myself/Progr/anaconda3/include/qt or /home/myself/Progr/Qt/5.10.0/gcc_64/include.
cheers, Mathieu
I am facing the similar kind of issue with this fatal error: QTransform: No such file or directory compilation terminated. find-object/CMakeFiles/objects_detected.dir/build.make:62: recipe for target 'find-object/CMakeFiles/objects_detected.dir/src/objects_detected.cpp.o' failed make[2]: *** [find-object/CMakeFiles/objects_detected.dir/src/objects_detected.cpp.o] Error 1 CMakeFiles/Makefile2:1963: recipe for target 'find-object/CMakeFiles/objects_detected.dir/all' failed make[1]: *** [find-object/CMakeFiles/objects_detected.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: *** [all] Error 2