Community
cancel
Showing results for 
Search instead for 
Did you mean: 
sizhe_x_
Beginner
68 Views

undefined reference to 'rs_set_device_options' in QT (ubuntu 14.04)

Hi, guys,

    I am just starting to use the realsense r200 on the nvidia TK1 board, which is based on the ubuntu 14.04. I have installed the realsense library successfully. The rs.h , rs.hpp, rutil.h  files are on the path /usr/local/include/librealse and the library is on the path of /usr/local/lib/librealsense.so.

   For testing the application, I just use QT environment.  The project configuration is configured as below in order the library

INCLUDEPATH += usr/local/include/realsense
LIB += -L/usr/local/lib  -lrealsense
In my main.cpp
 
#include <mainwindow.h>
#include <QPapplication>
#include<librealsense/rs.h>  
#include<librealsense/rs.hpp>  
#include<librealsense/rsutil.h>  

it main(int argc, char *argv[])
{
     QApplication a(argc, argv);
     MainWindow w;
     w.show();
     rs_error *e = 0;
     rs_context * ctx = rs_create_context(RS_API_VERSION, &e);
     return a.exec();

}

when running the application, it return me with a error "undefined reference to rs_set_device_options" error, but I have loaded the library and all the .h files. what is wrong with it  ? 

 
 
0 Kudos
1 Reply
Ncare
Beginner
68 Views

Did you ever figure this out? I've installed the linux distribution of the realsense drivers on several different machines, and never had a problem working with QTCreator - until today when I'm suddenly getting "undefined references" to functions declared in rs.hpp whenever I try to compile something.

A bit disconcerting as nothing functional has changed, rs.hpp is being included correctly, and the links look fine. But I will keep working on it.

 

UPDATE: rebuilding the static library fixed the problem.

0 Kudos