Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Link error in Qt Creator with Static Build Qt5.1 Library

Link error in Qt Creator with Static Build Qt5.1 Library

Scheduled Pinned Locked Moved Installation and Deployment
5 Posts 3 Posters 2.6k 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
    dnawujun
    wrote on last edited by
    #1

    I compiled the Qt5.1 static using these command(Source files in the D:\qt51)

    1. configure -prefix E:\DevelopTools\Qt5.1_static_vc2012_64 -opensource -confirm-license -static -platform win32-msvc2012 -debug-and-release -no-icu -opengl desktop -skip qtwebkit -nomake demos -nomake examples -nomake tests -mp"
    2. nmake
    3. nmake install
      Everything goes fine but when I make a new project in the Creator,the error shows:
      ERROR:LNK1104: Cann't open file“D:\qt51\qtbase\lib\Qt5PlatformSupportd.lib”
      I think this error is caused by the MakeFile.Debug, because in the MakeFile.Debug there is a line in the LIBS "D:\qt51\qtbase\lib\Qt5PlatformSupportd.lib"

    Does anyone know how to fix it?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Don't run "install" on a prefixed build... Qt does inform you about it at the end of configure output.

      (Z(:^

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dnawujun
        wrote on last edited by
        #3

        Thank for your reply.
        I found a solution here:
        http://code.google.com/p/qt-msvc-installer/wiki/RelocationTricks
        That is:

        1. Make a qt.conf in the E:/DevelopTools/Qt5.1_static_vc2012_64 /bin
          Edit the content as below
          [Paths]
          Prefix=E:/DevelopTools/Qt5.1_static_vc2012_64
        2. Replace ALL" D:\qt51\qtbase\lib" with "E:\DevelopTools\Qt5.1_static_vc2012_64\lib" in ALL prl files
          I use UltraEdit to do this
        1 Reply Last reply
        0
        • K Offline
          K Offline
          koahnig
          wrote on last edited by
          #4

          [quote author="dnawujun" date="1373959383"]Thank for your reply.
          I found a solution here:
          http://code.google.com/p/qt-msvc-installer/wiki/RelocationTricks
          That is:

          1. Make a qt.conf in the E:/DevelopTools/Qt5.1_static_vc2012_64 /bin
            Edit the content as below
            [Paths]
            Prefix=E:/DevelopTools/Qt5.1_static_vc2012_64
          2. Replace ALL" D:\qt51\qtbase\lib" with "E:\DevelopTools\Qt5.1_static_vc2012_64\lib" in ALL prl files
            I use UltraEdit to do this[/quote]

          Did this work out??
          The path is also set in qmake and stuff. At least it was in Qt4.

          Vote the answer(s) that helped you to solve your issue(s)

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

            Yes ,this solution works fine for Qt 5.1

            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