<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Can&#x27;t compile my dynamic lib if I include OpenGL on windows 10 but can on ubuntu]]></title><description><![CDATA[<p dir="auto">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.<br />
Here are some of the compiler outputs, (changing  the compiler doesn't solve the problem, here mingw64):</p>
<pre><code>&lt;command-line&gt;: error: expected unqualified-id before numeric constant
&lt;command-line&gt;: error: expected identifier before numeric constant
&lt;command-line&gt;: error: expected ',' or '...' before numeric constant
&lt;command-line&gt;: error: expected identifier before numeric constant
&lt;command-line&gt;: error: expected ',' or '...' before numeric constant
&lt;command-line&gt;: error: expected identifier before numeric constant
&lt;command-line&gt;: error: expected ',' or '...' before numeric constant
&lt;command-line&gt;: error: expected identifier before numeric constant
&lt;command-line&gt;: error: expected ',' or '...' before numeric constant
&lt;command-line&gt;: error: expected unqualified-id before numeric constant
&lt;command-line&gt;: error: expected unqualified-id before numeric constant
&lt;command-line&gt;: error: expected unqualified-id before numeric constant
&lt;command-line&gt;: error: expected unqualified-id before numeric constant
&lt;command-line&gt;: error: expected unqualified-id before numeric constant
&lt;command-line&gt;: error: expected unqualified-id before numeric constant
&lt;command-line&gt;: error: expected unqualified-id before numeric constant
&lt;command-line&gt;: error: expected identifier before numeric constant
&lt;command-line&gt;: 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);
                                                                                             ^
&lt;command-line&gt;: error: expected identifier before numeric constant
&lt;command-line&gt;: 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);
</code></pre>
<p dir="auto">All seams related to oleauto.h...<br />
I hope I can find help here.<br />
Thanks!</p>
]]></description><link>https://forum.qt.io/topic/130284/can-t-compile-my-dynamic-lib-if-i-include-opengl-on-windows-10-but-can-on-ubuntu</link><generator>RSS for Node</generator><lastBuildDate>Thu, 11 Jun 2026 22:37:18 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/130284.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 14 Sep 2021 08:43:55 GMT</pubDate><ttl>60</ttl></channel></rss>