Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Porting from 4.8.1 to 5.0.1, cannot include multiple libraries

    General and Desktop
    3
    4
    1117
    Loading More Posts
    • 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.
    • H
      hatfarm last edited by

      So, I started working on a project when 4.8.1 was the most recent release. Then, I got a new computer and decided to upgrade to 5.0.1 since I wanted to use some of the multimedia features. I've ported all of my libraries and another program. However, this one includes three of the libraries I built, and I am unable to use them all. I'm using MinGW on Windows, fyi. Here's my .pro file:

      @QT += opengl widgets gui

      INCLUDEPATH += ../../Libraries/BattleFileLib
      ../../Libraries/MAPLib
      ../../Libraries/BPKLib
      ../../ReleaseInfo

      SOURCES += main.cpp
      glwidget.cpp
      mainwindow.cpp

      HEADERS +=
      glwidget.h
      mainwindow.h

      FORMS +=
      mainwindow.ui

      LIBS+= -L ../../Libraries/BattleFileLib/release -l BattleFileLib
      -L ../../Libraries/MAPLib/release -l MAPLib
      -L ../../Libraries/BPKLib/release -l BPKLib@

      The error I'm getting from the compiler is:

      bq. g++: error: BattleFileLib: No such file or directory
      g++: error: MAPLib: No such file or directory

      Notice no BPKLib problems. I'm sure they're all built and in the /release folder. The thing is, I only added the widgets to QT+= at the top of the file (and changed a couple of the includes for Qt5) to get it to this part. I've been struggling with this for a couple days now, any help would be greatly appreciated.

      1 Reply Last reply Reply Quote 0
      • H
        Hostel last edited by

        Try change a LIBS to:
        @
        LIBS+= -L../../Libraries/BattleFileLib/release -lBattleFileLib
        -L../../Libraries/MAPLib/release -lMAPLib
        -L../../Libraries/BPKLib/release -lBPKLib
        @

        1 Reply Last reply Reply Quote 0
        • podsvirov
          podsvirov last edited by

          "Hostel":http://qt-project.org/member/17826 +1:

          [quote author="Hostel" date="1360977017"]

          Try change a LIBS to:
          @
          LIBS+= -L../../Libraries/BattleFileLib/release -lBattleFileLib
          -L../../Libraries/MAPLib/release -lMAPLib
          -L../../Libraries/BPKLib/release -lBPKLib
          @
          [/quote]

          Space between l and the library name is not needed.

          1 Reply Last reply Reply Quote 0
          • H
            hatfarm last edited by

            Great! That worked. Thank you so much. That was incredibly frustrating. It worked fine in 4.8.1. Good to know it wasn't anything huge.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post