Can't compile my dynamic lib if I include OpenGL on windows 10 but can on ubuntu
Unsolved
General and Desktop
-
Hi Everyone, i post here because while I can compile without problems my dynamic lib (Qt 5.15.2) on my linux machine, as soon as I try to compile it on windows, if I include any opengl related modules I have hundreds of errors. But, I can compile and run all the OpenGL Qt examples without problems.
Here are some of the compiler outputs, (changing the compiler doesn't solve the problem, here mingw64):<command-line>: error: expected unqualified-id before numeric constant <command-line>: error: expected identifier before numeric constant <command-line>: error: expected ',' or '...' before numeric constant <command-line>: error: expected identifier before numeric constant <command-line>: error: expected ',' or '...' before numeric constant <command-line>: error: expected identifier before numeric constant <command-line>: error: expected ',' or '...' before numeric constant <command-line>: error: expected identifier before numeric constant <command-line>: error: expected ',' or '...' before numeric constant <command-line>: error: expected unqualified-id before numeric constant <command-line>: error: expected unqualified-id before numeric constant <command-line>: error: expected unqualified-id before numeric constant <command-line>: error: expected unqualified-id before numeric constant <command-line>: error: expected unqualified-id before numeric constant <command-line>: error: expected unqualified-id before numeric constant <command-line>: error: expected unqualified-id before numeric constant <command-line>: error: expected identifier before numeric constant <command-line>: error: expected ',' or '...' before numeric constant In file included from D:/Qt/Tools/mingw810_64/x86_64-w64-mingw32/include/ole2.h:18, from D:/Qt/Tools/mingw810_64/x86_64-w64-mingw32/include/wtypes.h:12, from D:/Qt/Tools/mingw810_64/x86_64-w64-mingw32/include/winscard.h:10, from D:/Qt/Tools/mingw810_64/x86_64-w64-mingw32/include/windows.h:97, from D:\Qt\5.15.2\mingw81_64\include/QtCore/qt_windows.h:64, from D:\Qt\5.15.2\mingw81_64\include/QtGui/qopengl.h:49, from D:\Qt\5.15.2\mingw81_64\include\QtWidgets/qopenglwidget.h:49, from D:\Qt\5.15.2\mingw81_64\include\QtWidgets/QOpenGLWidget:1, from ..\cnc_lib\GUI\plots\3D\mesh_displayer.h:4, from ..\cnc_lib\GUI\plots\3D\mesh_displayer.cpp:1: D:/Qt/Tools/mingw810_64/x86_64-w64-mingw32/include/oleauto.h:52:44: error: definition of 'INT VariantTimeToDosDateTime' is marked 'dllimport' WINOLEAUTAPI_(INT) VariantTimeToDosDateTime(DOUBLE vtime,USHORT *pwDosDate,USHORT *pwDosTime); ^ D:/Qt/Tools/mingw810_64/x86_64-w64-mingw32/include/oleauto.h:52:52: error: expected ')' before 'vtime' WINOLEAUTAPI_(INT) VariantTimeToDosDateTime(DOUBLE vtime,USHORT *pwDosDate,USHORT *pwDosTime); ~ ^~~~~ D:/Qt/Tools/mingw810_64/x86_64-w64-mingw32/include/oleauto.h:52:65: error: expected primary-expression before '*' token WINOLEAUTAPI_(INT) VariantTimeToDosDateTime(DOUBLE vtime,USHORT *pwDosDate,USHORT *pwDosTime); ^ D:/Qt/Tools/mingw810_64/x86_64-w64-mingw32/include/oleauto.h:52:66: error: 'pwDosDate' was not declared in this scope WINOLEAUTAPI_(INT) VariantTimeToDosDateTime(DOUBLE vtime,USHORT *pwDosDate,USHORT *pwDosTime); ^~~~~~~~~ D:/Qt/Tools/mingw810_64/x86_64-w64-mingw32/include/oleauto.h:52:83: error: expected primary-expression before '*' token WINOLEAUTAPI_(INT) VariantTimeToDosDateTime(DOUBLE vtime,USHORT *pwDosDate,USHORT *pwDosTime); ^ D:/Qt/Tools/mingw810_64/x86_64-w64-mingw32/include/oleauto.h:52:84: error: 'pwDosTime' was not declared in this scope WINOLEAUTAPI_(INT) VariantTimeToDosDateTime(DOUBLE vtime,USHORT *pwDosDate,USHORT *pwDosTime); ^~~~~~~~~ D:/Qt/Tools/mingw810_64/x86_64-w64-mingw32/include/oleauto.h:52:93: error: expression list treated as compound expression in initializer [-fpermissive] WINOLEAUTAPI_(INT) VariantTimeToDosDateTime(DOUBLE vtime,USHORT *pwDosDate,USHORT *pwDosTime); ^ <command-line>: error: expected identifier before numeric constant <command-line>: error: expected ',' or '...' before numeric constant In file included from D:/Qt/Tools/mingw810_64/x86_64-w64-mingw32/include/ole2.h:18, from D:/Qt/Tools/mingw810_64/x86_64-w64-mingw32/include/wtypes.h:12, from D:/Qt/Tools/mingw810_64/x86_64-w64-mingw32/include/winscard.h:10, from D:/Qt/Tools/mingw810_64/x86_64-w64-mingw32/include/windows.h:97, from D:\Qt\5.15.2\mingw81_64\include/QtCore/qt_windows.h:64, from D:\Qt\5.15.2\mingw81_64\include/QtGui/qopengl.h:49, from D:\Qt\5.15.2\mingw81_64\include\QtWidgets/qopenglwidget.h:49, from D:\Qt\5.15.2\mingw81_64\include\QtWidgets/QOpenGLWidget:1, from ..\cnc_lib\GUI\plots\3D\mesh_displayer.h:4, from ..\cnc_lib\GUI\plots\3D\mesh_displayer.cpp:1: D:/Qt/Tools/mingw810_64/x86_64-w64-mingw32/include/oleauto.h:54:43: error: definition of 'INT VariantTimeToSystemTime' is marked 'dllimport' WINOLEAUTAPI_(INT) VariantTimeToSystemTime(DOUBLE vtime,LPSYSTEMTIME lpSystemTime); ^ D:/Qt/Tools/mingw810_64/x86_64-w64-mingw32/include/oleauto.h:54:51: error: expected ')' before 'vtime' WINOLEAUTAPI_(INT) VariantTimeToSystemTime(DOUBLE vtime,LPSYSTEMTIME lpSystemTime); ~ ^~~~~ D:/Qt/Tools/mingw810_64/x86_64-w64-mingw32/include/oleauto.h:54:70: error: expected primary-expression before 'lpSystemTime' WINOLEAUTAPI_(INT) VariantTimeToSystemTime(DOUBLE vtime,LPSYSTEMTIME lpSystemTime); ^~~~~~~~~~~~ D:/Qt/Tools/mingw810_64/x86_64-w64-mingw32/include/oleauto.h:54:82: error: expression list treated as compound expression in initializer [-fpermissive] WINOLEAUTAPI_(INT) VariantTimeToSystemTime(DOUBLE vtime,LPSYSTEMTIME lpSystemTime); ^ D:/Qt/Tools/mingw810_64/x86_64-w64-mingw32/include/oleauto.h:125:26: error: definition of 'HRESULT VarUI1FromR8' is marked 'dllimport' WINOLEAUTAPI VarUI1FromR8(DOUBLE dblIn,BYTE *pbOut);
All seams related to oleauto.h...
I hope I can find help here.
Thanks!