SDL linking library [closed]
Having a little trouble linking SDL to an executable in ROS. Here is what I have in my CMakelist to link the library.
rosbuild_add_executable(testbla src/testing.cpp) target_link_libraries(testbla SDL)
This is resulting in an error at runtime, seg faulting. The cause has been traced back to the initialization.
SDL_Init(SDL_INIT_VIDEO);
The debugging reveals..
Program received signal SIGSEGV, Segmentation fault. 0x00007ffff16c6468 in dlerror () from /lib/libdl.so.2 (gdb) bt #0 0x00007ffff16c6468 in dlerror () from /lib/libdl.so.2 #1 0x00007ffff264b9b7 in SDL_LoadFunction () from /usr/lib/libSDL-1.2.so.0 #2 0x00007ffff264cc15 in ?? () from /usr/lib/libSDL-1.2.so.0 #3 0x00007ffff264d7c8 in ?? () from /usr/lib/libSDL-1.2.so.0 #4 0x00007ffff2654f36 in ?? () from /usr/lib/libSDL-1.2.so.0 #5 0x00007ffff2647cec in SDL_VideoInit () from /usr/lib/libSDL-1.2.so.0 #6 0x00007ffff261e7eb in SDL_InitSubSystem () from /usr/lib/libSDL-1.2.so.0 #7 0x00007ffff261e82f in SDL_Init () from /usr/lib/libSDL-1.2.so.0 #8 0x0000000000401bb4 in main (argc=<value optimized="" out="">, argv=0x0) at /home/mak1pal/ros/constrained_teleop/src/testing.cpp:53 (gdb) quit A debugging session is active.
Any help is appreciated. Thanks.