[SOLVED] Using the STXXL library with Qt



  • Greetings.

    I want to use the STXXL library in my Qt project, but I can not get it (basically, this describes the whole problem).

    Install the STXXL library and then built and run some test programs to make sure that the installation was fine. I use CMake for to build these sample programs.

    Now, for work with Qt + STXXL, I try to add the following lines to my Qt project file (.pro file):

    @
    INCLUDEPATH += /usr/include/stxxl
    LIBS += -lpthread -lstxxl
    @

    However, this did not work.

    I say, moreover, that the error messages given by Qt creator don't appear to be related to STXXL (actually I don't know that those messages should be or where those messages come from). For example, I get error messages like the following:

    /usr/include/c++/4.9.0/parallel/multiway_mergesort.h: 421: error:undefined reference to `omp_get_num_threads'.

    I welcome any help and/or suggestions that brings light to this problem.
    Thanks in advance.



  • Looks like omp_get_num_threads is a part of OpenMP.
    I guess you need to include OpenMP as well or disable some STXXL options to prevent using OpenMP.



  • I have also

    @QMAKE_CXXFLAGS +=-fopenmp@

    into me .pro ​​file.

    Still I get the errors mentioned above.



  • Greetings.

    Some time ago I found the solution to the problem, but had forgotten to post about it. You have to add the following lines in the project file (.pro file):

    @
    INCLUDEPATH += /usr/include
    LIBS += -lpthread -lgomp -lstxxl_debug

    Compiler Config

    QMAKE_CXXFLAGS += -fopenmp
    @

    I apologize for not posting before and I hope this post will be helpful to anyone trying to work with Qt + STXXL.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.