Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Can't compile my dynamic lib if I include OpenGL on windows 10 but can on ubuntu
Forum Updated to NodeBB v4.3 + New Features

Can't compile my dynamic lib if I include OpenGL on windows 10 but can on ubuntu

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 183 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Eulerson314
    wrote on last edited by Eulerson314
    #1

    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!

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved