Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
2.4.3
-
None
-
-
351ae44ce76ef18a07e3bff551b720146a2d6637
Description
If QT += opengl is present, importing a .pro file containing a reference to opengl32.lib will generate a VS project without a reference to that library, which will lead to "unresolved external symbol" errors when linking against it.
Also, paths to the Qt installation directory are not replaced in the project file with $(QTDIR), as expected.
QT += opengl 3dquick LIBS += -lopengl32 SOURCES += foo.cpp
#include <windows.h> #include <gl/GL.h> int main(int, char *[]) { return (int)glGetError(); }
1>------ Rebuild All started: Project: foo, Configuration: Debug x64 ------
1>Reading Qt configuration (D:\lib\Qt\5.13.2\msvc2017_64\bin\qmake.exe)
1>Generate moc_predefs.h
1>foo.cpp
1>foo.obj : error LNK2019: unresolved external symbol __imp_glGetError referenced in function main
1>debug
foo.exe : fatal error LNK1120: 1 unresolved externals
1>Done building project "foo.vcxproj" – FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Attachments
Issue Links
- resulted from
-
QTVSADDINBUG-704 gui-private module is not added to Visual Studio project file
- Closed
For Gerrit Dashboard: QTVSADDINBUG-771 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
299328,6 | Fix .pro import not replacing QTDIR | dev | qt-labs/vstools | Status: MERGED | +2 | 0 |
299329,2 | Fix .pro import removing dependency to opengl32.lib | dev | qt-labs/vstools | Status: MERGED | +2 | 0 |