![]() make the joystick target a library ( add_library(.) instead of add_executable(.This seems to indicate that the js_info target requires symbols from joystick.cpp. Js_info.cpp:(.text+0x234): undefined reference to `Joystick::numAxes()' Js_info.cpp:(.text+0x204): undefined reference to `Joystick::getName()' In Linux, DL libraries arent actually special from the point-of-view of their format they are built as standard object files or standard shared libraries. Js_info.cpp:(.text+0x7a): undefined reference to `Joystick::Joystick(char const*)' ![]() I get the following error: ĬMakeFiles/js_info.dir/src/js_: In function `main': ![]() Many developers use CMake to control their software compilation process using simple platform- and compiler-independent configuration files. This below shown is my CMakeLists.txt file: cmake_minimum_required(VERSION 2.8.3)Īdd_executable(joystick src/joystick.cpp) CMake is an open-source, cross-platform family of tools designed to build, test and package software across different platforms. Invoking "make cmake_check_build_system" failed See also "/home/darshan/catkin_ws/build/CMakeFiles/CMakeError.log". See also "/home/darshan/catkin_ws/build/CMakeFiles/CMakeOutput.log". Configuring incomplete, errors occurred! One may link only to STATIC or SHARED libraries, or to executables with the Target "joystick" of type EXECUTABLE may not be linked into another target. I have compiled that 3 files and they work correctly.īut when i placed this files as told you above, gives me error as shown below: CMake Error at joy/CMakeLists.txt:61 (target_link_libraries): also i have header file joystick.h under include/joy folder. I have created a pkg named "joy" in which there are two source file named joystick.cpp and js_info.cpp under joy/src folder.
0 Comments
Leave a Reply. |