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. 3rd Part library do not compile with Qt Creator...
QtWS25 Last Chance

3rd Part library do not compile with Qt Creator...

Scheduled Pinned Locked Moved 3rd Party Software
3 Posts 2 Posters 2.2k Views
  • 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.
  • B Offline
    B Offline
    belimawr
    wrote on last edited by
    #1

    Hi,

    I am using a 3rd Party library GBDI Arboretum (http://gbdi.icmc.usp.br/arboretum) in a Qt with OpenGL project. For a time it worked well, but now I need to add some .cpp files and when I compile the project I receive thousands errors like: "multiple definition of" some function....

    I am following an example which uses the same includes, and this example works very well. However this example is not a Qt project, it is only a .cpp file that I compile using: @g++ -I ./arboretum/include/ -I ./arboretum/src/ main-app.cpp@

    So, the problem is not in fact that I have included some .cpp, it is something that Qt is doing...

    I added the INCLUDEPATH in .pro file:
    @INCLUDEPATH += ./arboretum/include/
    ./arboretum/src/@

    Qt can find the library files, but can not compile it correctly.

    I tried everything which I found in Qt help, but nothing worked for me...

    To make sure that the problem is in Qt, I did a test using Netbeans and the same arboretum library and includes. To compile I only had to do was add "arboretum/src" and "arboretum/include" in the include path and it worked well.

    Once again, the problem seems be only in Qt...

    Does anyone have any suggestion?

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      What are the actual error messages? Are they from the compiler or the linker?

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • B Offline
        B Offline
        belimawr
        wrote on last edited by
        #3

        [quote author="Volker" date="1342122841"]What are the actual error messages? Are they from the compiler or the linker?[/quote]

        I think they are from compiler here is an example:
        @g++ -Wl,-O1 -o Simulador_de_Particulas main.o janelaprincipal.o opengl.o trackball.o fastareader.o clusterclass.o moc_janelaprincipal.o moc_opengl.o qrc_shader.o -L/usr/lib -L/usr/X11R6/lib -lQtOpenGL -lQtGui -lQtCore -lGLU -lGL -lpthread
        janelaprincipal.o: In function stPage::GetPageSize()': janelaprincipal.cpp:(.text+0x0): multiple definition of stPage::GetPageSize()'
        main.o:main.cpp:(.text+0x0): first defined here
        janelaprincipal.o: In function stPage::GetData()': janelaprincipal.cpp:(.text+0x10): multiple definition of stPage::GetData()'
        main.o:main.cpp:(.text+0x10): first defined here
        janelaprincipal.o: In function stLockablePage::GetPageSize()': janelaprincipal.cpp:(.text+0x20): multiple definition of stLockablePage::GetPageSize()'
        main.o:main.cpp:(.text+0x20): first defined here
        janelaprincipal.o: In function stLockablePage::GetData()': janelaprincipal.cpp:(.text+0x30): multiple definition of stLockablePage::GetData()'
        main.o:main.cpp:(.text+0x30): first defined here@

        and they continue for thousands of lines...

        If you want to see all messages, I uploaded the output from make on my server: http://tiago.eti.br/make_output

        1 Reply Last reply
        0

        • Login

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