Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Porting from 4.8.1 to 5.0.1, cannot include multiple libraries
QtWS25 Last Chance

Porting from 4.8.1 to 5.0.1, cannot include multiple libraries

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 1.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.
  • H Offline
    H Offline
    hatfarm
    wrote on last edited by
    #1

    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
    0
    • H Offline
      H Offline
      Hostel
      wrote on last edited by
      #2

      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
      0
      • podsvirovP Offline
        podsvirovP Offline
        podsvirov
        wrote on last edited by
        #3

        "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
        0
        • H Offline
          H Offline
          hatfarm
          wrote on last edited by
          #4

          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
          0

          • Login

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