Menu

dlib and Qt building problem

Help
schon
2018-03-26
2018-03-27
  • schon

    schon - 2018-03-26

    Hi guys,
    i have a problem while building a Qt project which is using the dlib library
    i have build the dlib in a release mode with the following line:

    wget http://dlib.net/files/dlib-19.10.tar.bz2
    tar xvf dlib-19.10.tar.bz2
    cd dlib-19.10/
    mkdir build
    cd build
    cmake ..
    cmake --build . --config Release
    sudo make install
    sudo ldconfig
    cd ..
    

    and in my usr/local/include i have all the include file, i also get in pkg_config repo the .pc for the dlib library but i got the following error when i try to define my deep learning network in Qt.

    /home/jimmy/Desktop/Connected_Robotics_Watson/workco/work/mainWindow.cpp:-1: error: undefined reference to `dlib::cpu::pooling::pooling()'
    

    in my .pro i have defined the link to the library with pkg config :

    QMAKE_CXXFLAGS += -std=c++11
    PKGCONFIG = dlib-1
    

    withtout any network defined in the code, i can build the Qt project but once i have the network, it fails.

    I also tried to use a normal cpp project and compile with a cmake and everything worked well so maybe there is a problem when i link to Qt environment.

    Thank you in advance guys,

     
    • Davis

      Davis - 2018-03-26

      Link to dlib. Give -ldlib

       
      • schon

        schon - 2018-03-27

        Thank you

        When i try to just use a simple matric from dlib in my Qt code with the same .pro file, it worked, i can compile and run the program and display the dlib matrix but once i started to define the CNN i got the error.

        i have tried to add -ldlib in the .pro file but i get new error...

        :-1: error: /usr/local/lib/libdlib.a(cpu_dlib.cpp.o): undefined reference to symbol 'cblas_sscal'
        /usr/lib/libblas.so.3:-1: error: error adding symbols: DSO missing from command line
        

        the way i have installed dlib library has created a static library libdlib.a and add the metadata .pc in the pkgconfig repository.
        Thank you

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.