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. Windows VS2010 based QTCreator and 3rd party libraries SOLVED
Forum Updated to NodeBB v4.3 + New Features

Windows VS2010 based QTCreator and 3rd party libraries SOLVED

Scheduled Pinned Locked Moved General and Desktop
8 Posts 4 Posters 2.0k 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.
  • G Offline
    G Offline
    gpuckett54
    wrote on last edited by
    #1

    I have Qt Creator 3.0.1 installed with the Qt 5.2.1 (MVSC 2010, 32 bit) libraries. I am new to Qt and it's been quite a few years since my C++ training so I am struggling in general. It's difficult to judge if I have a problem with my Qt project configuration or with the sample code I am trying to run. Right now I think it has to do with configuring the project correctly in Qt.

    The sample project is called HelloWorldQt.pro.

    @
    QT += widgets
    TEMPLATE = app
    TARGET = HelloWorldQt
    INCLUDEPATH += "C:/Program Files/MetaMAP/MetaMAP Engine 2 SDK/include"
    QMAKE_LIBDIR += "C:/Program Files/MetaMAP/MetaMAP Engine 2 SDK/libs"

    HEADERS +=
    ./helloworldqt.h
    "C:/Program Files/MetaMAP/MetaMAP Engine 2 SDK/include/MetaMAP/Engine/Controls/QtMapControl.hpp"

    SOURCES +=
    ./main.cpp
    ./helloworldqt.cpp

    FORMS +=
    ./helloworldqt.ui
    @

    When I try to build the project I get the following error:

    _dependent 'C:\Program' does not exist_

    What do I need to do to make this work?

    1 Reply Last reply
    0
    • N Offline
      N Offline
      nandhu_kp
      wrote on last edited by
      #2

      DEPENDPATH += .

      add this entry to your .pro file

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Alexander Linne
        wrote on last edited by
        #3

        If you use e.g. message($$HEADERS), you'll see that there are no " anymore, so QMake thinks C:/Programm is a single argument as they are divided by spaces. ;)
        Using " instead of " for all three paths should solve the problem!

        Regards

        1 Reply Last reply
        0
        • G Offline
          G Offline
          gpuckett54
          wrote on last edited by
          #4

          I have made progress. I changed the paths to use environment variables. They contain spaces but I can now build the project but unsuccessfully. I am getting new error messages.

          The UI has a customwidget. It's in the file helloworldqt.ui file. Under the QMainWindow the centralWidget implements MetaMAP::Engine::QtMapControl. When I attempt to build the project I get three duplicate errors in ui_helloworldqt.h.

          Cannot open include file: 'MetaMAP/Engine/Controls/QtMapControl.hpp': No such file or directory

          I have double checked that the header file is there. If I open the UI file in a text editor the custom widget has the following:

          @
          <customwidget>
          <class>MetaMAP::Engine::QtMapControl</class>
          <extends>QWidget</extends>
          <header>MetaMAP/Engine/Controls/QtMapControl.hpp</header>
          <container>1</container>
          </customwidget>
          @

          Now what am I doing wrong?

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi,

            @
            QMAKE_LIBDIR += "C:/Program Files/MetaMAP/MetaMAP Engine 2 SDK/libs"
            @

            Should rather be:

            @
            LIBS += -L$$quote("C:/Program Files/MetaMAP/MetaMAP Engine 2 SDK/libs")
            @

            If this still doesn't work, it means that the spaces are wreaking havoc. Then the best thing to do is use the 8.3 naming.
            Something like

            @
            LIBS += -LC:/PROGRA~1/MetaMAP/METAMA~1
            @

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • G Offline
              G Offline
              gpuckett54
              wrote on last edited by
              #6

              Thanks for your input. Ok, so I might have a problem with the LIBDIR. However, it's the include path I have a problem with. Right? I ask this because you changed from QMAKE_LIBDIR to LIBS. Also you added the -L. I'll look that up in the manuals. That's great if that is necessary. But how will that resolve the problem with the includes?

              I changed to the 8.3 names with no change in the results.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Why are you putting a header from that library in INCLUDES ? It's not part of your sources

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  gpuckett54
                  wrote on last edited by
                  #8

                  I have gotten these problems resolved. The include you questioned was required to be able to use the 3rd party API. When I removed it from the .pro file I got hundreds of compile errors.

                  I had to use the 8.3 short names for the project to compile. I understand. The world of desktop development is focused on the Linux environment and those doing Windows only development have to accommodate. I just had to get it figured out.

                  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