Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QtCreator linking problem
Qt 6.11 is out! See what's new in the release blog

QtCreator linking problem

Scheduled Pinned Locked Moved Qt Creator and other tools
5 Posts 3 Posters 3.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.
  • D Offline
    D Offline
    dahicke
    wrote on last edited by
    #1

    I am having this problem building a sub-project in QtCreator, which builds outside in MS VS 2008 with Qt plugins and on the command line with a qmake and nmake call. I have gotten other sub-projects in the project to build, but this one is exhibiting linker errors for unresolved symbols for some STL IO stream code generated by XSD. The symbols are in the code and appear to be in the obj file that is included for linker, and calling nmake will link it and create the dll.

    Other think I noticed that either in QtCreator or by calling qmake seems to call the .pro file 3 times because I get the following output:
    Project MESSAGE: debug set
    Project MESSAGE: Debug build!
    Project MESSAGE: debug set
    Project MESSAGE: Debug build!
    Project MESSAGE: release set
    Project MESSAGE: Debug build!

    Generated from the following lines in the .pro file:

    at the top

    CONFIG(release, debug|release):message(release set) #will print
    CONFIG(debug, debug|release):message(debug set) #no print

    for some reason, on the third time though it is defined as release, so I applied the following

    CONFIG += debug

    in the middle

    CONFIG(release, debug|release){
    ...
    message(Release build!)
    }

    CONFIG(debug, debug|release){
    ...
    message(Debug build!)
    }

    If anyone has some idea, why this behavior with QtCreator or qmake calling the .pro file three times, I would like hear it.

    I am using these Qt products on a Windows 7 with VS 2008:
    QtCreator 2.2.1
    Qt 4.7.3

    Thanks,

    Dave

    Dave Hickerson

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dahicke
      wrote on last edited by
      #2

      BTW, I also tried changing out jom for nmake, but no joy.

      Dave Hickerson

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tobias.hunger
        wrote on last edited by
        #3

        All Qt Creator does is to run qmake and make (or nmake, mingw-make or jom or however it happens to be called on windows;-). So it is surprising to me that qmake/make works but Qt Creator does not. Try running the exact commands Qt Creator does (they are printed in the build output and visible in project mode) and see whether that works or not.

        Yes, Qmake parses the .pro files several times. That is normal for qmake.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dahicke
          wrote on last edited by
          #4

          I tried rerunning the link line from the creator output, but there is a temp file, <something>.jom, in a temp directory that is deleted as the make exits. The line at the end of the link line looks like this:
          @C:\Users\DHICKE~1.COS\AppData\Local\Temp\SoiTrackXmlPlugin.dll.6256.156.jom

          I have noticed that changes where directories are for intermediate files which doesn't happen with a strict qmake and nmake.

          What is the purpose of the multiple passes? If I set CONFIG in the .pro file to debug or release, am I messing some functionality up?

          Dave Hickerson

          1 Reply Last reply
          0
          • D Offline
            D Offline
            Duck
            wrote on last edited by
            #5

            are you really literally using "CONFIG" as scope? if so, what do you want to achieve?

            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