Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. [SOLVED] Using the STXXL library with Qt
Qt 6.11 is out! See what's new in the release blog

[SOLVED] Using the STXXL library with Qt

Scheduled Pinned Locked Moved 3rd Party Software
4 Posts 2 Posters 2.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    isaacEnrique
    wrote on last edited by
    #1

    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.

    Isaac Pérez
    Programming is understanding.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andreyc
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • I Offline
        I Offline
        isaacEnrique
        wrote on last edited by
        #3

        I have also

        @QMAKE_CXXFLAGS +=-fopenmp@

        into me .pro ​​file.

        Still I get the errors mentioned above.

        Isaac Pérez
        Programming is understanding.

        1 Reply Last reply
        0
        • I Offline
          I Offline
          isaacEnrique
          wrote on last edited by
          #4

          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.

          Isaac Pérez
          Programming is understanding.

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved