LINK : fatal error LNK1181: cannot open input file 'qtmain.lib'
-
wrote on 26 Feb 2022, 09:57 last edited by
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.
-
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.
@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?
-
wrote on 28 Feb 2022, 08:21 last edited by
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.
-
@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?
wrote on 28 Feb 2022, 09:16 last edited by@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?
-
@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?
@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).
-
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.
wrote on 28 Feb 2022, 09:30 last edited by@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?
-
@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).
wrote on 28 Feb 2022, 09:43 last edited by@jsulm OK, there are two more questions.
- 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?
- 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.
-
@jsulm OK, there are two more questions.
- 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?
- 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.
@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).
-
@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).
-
@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).
wrote on 28 Feb 2022, 10:13 last edited by@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/10