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