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. Qt Creator fails to update project when removing static lib
Forum Updated to NodeBB v4.3 + New Features

Qt Creator fails to update project when removing static lib

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
4 Posts 2 Posters 658 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.
  • J Offline
    J Offline
    J0Nes
    wrote on last edited by
    #1

    Hey Qt community!
    I am having a Qt subproject that is linking against a static library (boost filesystem) like so:

    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../3rdParty/boost/lib/win/ -llibboost_filesystem-vc141-mt-x64-1_72
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../3rdParty/boost/lib/win/ -llibboost_filesystem-vc141-mt-gd-x64-1_72
    else:unix: LIBS += -L$$PWD/../3rdParty/boost/lib/macos/ -lboost_filesystem
    
    INCLUDEPATH += $$PWD/../3rdParty/boost/include
    DEPENDPATH += $$PWD/../3rdParty/boost/include
    
    win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../3rdParty/boost/lib/win/libboost_filesystem-vc141-mt-x64-1_72.lib
    else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../3rdParty/boost/lib/win/libboost_filesystem-vc141-mt-gd-x64-1_72.lib
    else:unix: PRE_TARGETDEPS += $$PWD/../3rdParty/boost/lib/macos/libboost_filesystem.a
    

    When I remove the static library (so the entire block) from the .pro file of my subproject I do get an error when building:

    :-1: error: LNK1104: cannot open file 'libboost_filesystem-vc141-mt-gd-x64-1_72.lib'
    

    I tried all kinds of things like restarting Qt Creator, rebuilding, cleaning, deleting the shadow build directory. Nothing seems to work. I really don't understand why Qt Creator continues to look for the .lib.
    Is there any cache I am missing?

    My selected Kit is MSVC 2017 15.9 (amd64), Qt 5.13.0 MSVC2017 (64 bit)

    Thanks for your help!

    aha_1980A 1 Reply Last reply
    0
    • J J0Nes

      Hey Qt community!
      I am having a Qt subproject that is linking against a static library (boost filesystem) like so:

      win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../3rdParty/boost/lib/win/ -llibboost_filesystem-vc141-mt-x64-1_72
      else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../3rdParty/boost/lib/win/ -llibboost_filesystem-vc141-mt-gd-x64-1_72
      else:unix: LIBS += -L$$PWD/../3rdParty/boost/lib/macos/ -lboost_filesystem
      
      INCLUDEPATH += $$PWD/../3rdParty/boost/include
      DEPENDPATH += $$PWD/../3rdParty/boost/include
      
      win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../3rdParty/boost/lib/win/libboost_filesystem-vc141-mt-x64-1_72.lib
      else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../3rdParty/boost/lib/win/libboost_filesystem-vc141-mt-gd-x64-1_72.lib
      else:unix: PRE_TARGETDEPS += $$PWD/../3rdParty/boost/lib/macos/libboost_filesystem.a
      

      When I remove the static library (so the entire block) from the .pro file of my subproject I do get an error when building:

      :-1: error: LNK1104: cannot open file 'libboost_filesystem-vc141-mt-gd-x64-1_72.lib'
      

      I tried all kinds of things like restarting Qt Creator, rebuilding, cleaning, deleting the shadow build directory. Nothing seems to work. I really don't understand why Qt Creator continues to look for the .lib.
      Is there any cache I am missing?

      My selected Kit is MSVC 2017 15.9 (amd64), Qt 5.13.0 MSVC2017 (64 bit)

      Thanks for your help!

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi @J0Nes,

      please check if you have a stale Makefile laying around.

      Regards

      Qt has to stay free or it will die.

      1 Reply Last reply
      1
      • J Offline
        J Offline
        J0Nes
        wrote on last edited by
        #3

        Hey,

        nope, the only makefile is in the shadowbuild directory which I explicitly delete

        1 Reply Last reply
        0
        • J Offline
          J Offline
          J0Nes
          wrote on last edited by
          #4

          Turns out that just including boost/process.hpp auto links against the mentioned library. I was not aware that this is even possible.
          Thanks for your help

          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