Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qt integration tests UseQt and Emit fail due to linker error on Windows #22

Open
maltekliemann opened this issue Aug 5, 2021 · 0 comments

Comments

@maltekliemann
Copy link
Member

The exact error (for UseQt) is:

LINK Pass 1: command "C:\PROGRA~2\MICROS~1\2019\ENTERP~1\VC\Tools\MSVC\1429~1.300\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\UseQtTest.dir\objects1.rsp /out:UseQtTest.exe /implib:UseQtTest.lib /pdb:D:\a\DrMock\DrMock\build\tests\integration\UseQtTest.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console DrMockQtMock.lib ..\..\src\DrMock.lib D:\a\DrMock\Qt\5.15.2\msvc2019_64\lib\Qt5Testd.lib D:\a\DrMock\Qt\5.15.2\msvc2019_64\lib\Qt5Cored.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\UseQtTest.dir/intermediate.manifest CMakeFiles\UseQtTest.dir/manifest.res" failed (exit code 1120) with the following output:
609
UseQtTest.cpp.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const outer::inner::IUseQt::staticMetaObject" (?staticMetaObject@IUseQt@inner@outer@@2UQMetaObject@@B)
610
UseQtTest.exe : fatal error LNK1120: 1 unresolved externals

(Similar for Emit.) This seems to be a problem with the way MSVC does symbol import/exports (which doesn't work despite CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS):

The Qt integration tests have been disabled, for now. Uncomment in .github/workflows/windows.yml to reproduce the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant