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. LINK : fatal error LNK1181: cannot open input file 'qtmain.lib'
Forum Updated to NodeBB v4.3 + New Features

LINK : fatal error LNK1181: cannot open input file 'qtmain.lib'

Scheduled Pinned Locked Moved Unsolved General and Desktop
10 Posts 3 Posters 1.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.
  • N Offline
    N Offline
    Nan Feng
    wrote on 26 Feb 2022, 09:57 last edited by
    #1

    Dear community folks, I'm having some issues. When using Qt 4.8.7 after static compilation. An error occurred: LINK : fatal error LNK1181: cannot open input file "f:\Environment\MSVC-2005-QtStaticLib\lib\QtCore.lib"
    This directory is the directory where I compiled the source code. Obviously, the compiler is looking for the lib file in this directory. Libraries=../lib is configured in qt.conf in the same directory of qmake.exe, and an error occurs when compiling again: LINK : fatal error LNK1181: The input file "qtmain.lib" cannot be opened. QtCore.lib and qtmain.lib are in the same level directory. Why does this happen? How to configure qt.conf so that the location of the compiler can be moved arbitrarily? Or how to configure it at compile time?

    In addition, I would like to ask, does Qt 5.6.3 support Windows XP Home Edition after recompilation? Deploy only.

    J 1 Reply Last reply 28 Feb 2022, 06:36
    0
    • N Nan Feng
      26 Feb 2022, 09:57

      Dear community folks, I'm having some issues. When using Qt 4.8.7 after static compilation. An error occurred: LINK : fatal error LNK1181: cannot open input file "f:\Environment\MSVC-2005-QtStaticLib\lib\QtCore.lib"
      This directory is the directory where I compiled the source code. Obviously, the compiler is looking for the lib file in this directory. Libraries=../lib is configured in qt.conf in the same directory of qmake.exe, and an error occurs when compiling again: LINK : fatal error LNK1181: The input file "qtmain.lib" cannot be opened. QtCore.lib and qtmain.lib are in the same level directory. Why does this happen? How to configure qt.conf so that the location of the compiler can be moved arbitrarily? Or how to configure it at compile time?

      In addition, I would like to ask, does Qt 5.6.3 support Windows XP Home Edition after recompilation? Deploy only.

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 28 Feb 2022, 06:36 last edited by
      #2

      @Nan-Feng said in LINK : fatal error LNK1181: cannot open input file 'qtmain.lib':

      does Qt 5.6.3 support Windows XP Home Edition after recompilation?

      https://doc.qt.io/archives/qt-5.6/supported-platforms.html

      Did you also do "make install" after building Qt?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      N 1 Reply Last reply 28 Feb 2022, 09:16
      0
      • S Offline
        S Offline
        SimonSchroeder
        wrote on 28 Feb 2022, 08:21 last edited by
        #3

        During compilation you specify where Qt should be located in the end. This path is hard-coded into qmake and qmake will always look in that directory for everything Qt-related. It is not easily possible to change directories later on.

        N 1 Reply Last reply 28 Feb 2022, 09:30
        0
        • J jsulm
          28 Feb 2022, 06:36

          @Nan-Feng said in LINK : fatal error LNK1181: cannot open input file 'qtmain.lib':

          does Qt 5.6.3 support Windows XP Home Edition after recompilation?

          https://doc.qt.io/archives/qt-5.6/supported-platforms.html

          Did you also do "make install" after building Qt?

          N Offline
          N Offline
          Nan Feng
          wrote on 28 Feb 2022, 09:16 last edited by
          #4

          @jsulm Hi. I am very glad that you took your precious time to reply to me. Yes, I did nmake install. I saw the link you gave. It is sufficient to deploy Qt 5.6.3 on Windows XP only. So does this Windows XP refer to all editions? For example: Home Edition (2001 version), or Pro version. SP3. All possible?

          J 1 Reply Last reply 28 Feb 2022, 09:18
          0
          • N Nan Feng
            28 Feb 2022, 09:16

            @jsulm Hi. I am very glad that you took your precious time to reply to me. Yes, I did nmake install. I saw the link you gave. It is sufficient to deploy Qt 5.6.3 on Windows XP only. So does this Windows XP refer to all editions? For example: Home Edition (2001 version), or Pro version. SP3. All possible?

            J Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 28 Feb 2022, 09:18 last edited by
            #5

            @Nan-Feng said in LINK : fatal error LNK1181: cannot open input file 'qtmain.lib':

            All possible?

            All, edition doesn't matter (except embedded versions maybe).

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            N 1 Reply Last reply 28 Feb 2022, 09:43
            0
            • S SimonSchroeder
              28 Feb 2022, 08:21

              During compilation you specify where Qt should be located in the end. This path is hard-coded into qmake and qmake will always look in that directory for everything Qt-related. It is not easily possible to change directories later on.

              N Offline
              N Offline
              Nan Feng
              wrote on 28 Feb 2022, 09:30 last edited by
              #6

              @SimonSchroeder Hi nice to meet you. thank you for your reply. Since this information is written dead in qmake. So how does Qt official 4.8.7 achieve any installation location?

              1 Reply Last reply
              0
              • J jsulm
                28 Feb 2022, 09:18

                @Nan-Feng said in LINK : fatal error LNK1181: cannot open input file 'qtmain.lib':

                All possible?

                All, edition doesn't matter (except embedded versions maybe).

                N Offline
                N Offline
                Nan Feng
                wrote on 28 Feb 2022, 09:43 last edited by
                #7

                @jsulm OK, there are two more questions.

                1. About the qmake program contains a lot of information when compiling. As a result, it cannot be moved at will, so why can Qt officially set the installation location at will?
                2. Will the Qt 5.15.3 binary distribution and source code be available to open source users in a few days? Because it's almost a year since his release date. Qt officially promises to distribute to non-commercial users for one year.
                J 1 Reply Last reply 28 Feb 2022, 09:48
                0
                • N Nan Feng
                  28 Feb 2022, 09:43

                  @jsulm OK, there are two more questions.

                  1. About the qmake program contains a lot of information when compiling. As a result, it cannot be moved at will, so why can Qt officially set the installation location at will?
                  2. Will the Qt 5.15.3 binary distribution and source code be available to open source users in a few days? Because it's almost a year since his release date. Qt officially promises to distribute to non-commercial users for one year.
                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 28 Feb 2022, 09:48 last edited by
                  #8

                  @Nan-Feng said in LINK : fatal error LNK1181: cannot open input file 'qtmain.lib':

                  so why can Qt officially set the installation location at will?

                  Installation location can be set by you, either using online/offline installer or when compiling Qt by yourself. Qt only defines default locations if you do not tell it where to install.

                  Qt 5.15.3 will not be available as oss (not as binary at least).

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  N 2 Replies Last reply 28 Feb 2022, 10:01
                  0
                  • J jsulm
                    28 Feb 2022, 09:48

                    @Nan-Feng said in LINK : fatal error LNK1181: cannot open input file 'qtmain.lib':

                    so why can Qt officially set the installation location at will?

                    Installation location can be set by you, either using online/offline installer or when compiling Qt by yourself. Qt only defines default locations if you do not tell it where to install.

                    Qt 5.15.3 will not be available as oss (not as binary at least).

                    N Offline
                    N Offline
                    Nan Feng
                    wrote on 28 Feb 2022, 10:01 last edited by
                    #9

                    @jsulm So is it possible to get the source code for 5.15.3?

                    1 Reply Last reply
                    0
                    • J jsulm
                      28 Feb 2022, 09:48

                      @Nan-Feng said in LINK : fatal error LNK1181: cannot open input file 'qtmain.lib':

                      so why can Qt officially set the installation location at will?

                      Installation location can be set by you, either using online/offline installer or when compiling Qt by yourself. Qt only defines default locations if you do not tell it where to install.

                      Qt 5.15.3 will not be available as oss (not as binary at least).

                      N Offline
                      N Offline
                      Nan Feng
                      wrote on 28 Feb 2022, 10:13 last edited by
                      #10

                      @jsulm OK, thanks. There's another question I just forgot to mention. For example button: QSS After setting border-left, the text will be offset to the right. And as the border-width increases, the text offset also increases. Is there any way to keep him from drifting?

                      1 Reply Last reply
                      0

                      1/10

                      26 Feb 2022, 09:57

                      • Login

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