I am trying to make a project for the Pi B+ using ROS, RaspiCam and OpenCV (in c++). I want to write my code in QTCreator in a Virtual Machine running Ubuntu 14.04, and then transfer the files to my Pi.
My test project (taking an image from the camera) builds and runs fine on the Pi, but when i include and use the "raspicam.h" in QTCreator in Ubuntu, it gives me multiple "undefined reference to ´raspicam::_private::Private_impl::[...]" errors ([...] being setISO(), grab(), setHeight() etc).
I know I can´t run the project in Ubuntu, but i was hoping that i still could compile the project to check for errors.
I am quite new to Linux (both Ubuntu and Raspbian)
- I am using the same cpp and CMakeLists.txt files as on the Pi
- I have installed Raspicam 0.1.3 on my Pi and in Ubuntu.
- I have exported raspicam_DIR as the build directory in raspicam-0.1.3
In my CMakeLists.txt I do
find_package(raspicam REQUIRED)
find_package(OpenCV REQUIRED)
add_executable(image_reader src/image_reader.cpp)
target_link_libraries(image_reader ${catkin_LIBRARIES})
target_link_libraries(image_reader ${OpenCV_LIBS})
target_link_libraries(image_reader ${raspicam_CV_LIBS})
add_dependencies(image_reader image_tests_gencpp)
Did i miss something?