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. How can I solve this error ?
Forum Updated to NodeBB v4.3 + New Features

How can I solve this error ?

Scheduled Pinned Locked Moved Solved General and Desktop
qcompilerdetectqt 5.13.1
3 Posts 2 Posters 1.1k 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.
  • Y Offline
    Y Offline
    Yash001
    wrote on last edited by
    #1

    Hello,

    I am using Ubuntu OS 18.04.3 and Qt 5.13.1.

    Here compiler output:

    In file included from /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:105:0,
                     from /opt/Qt/5.13.1/gcc_64/include/QtCore/qalgorithms.h:43,
                     from /opt/Qt/5.13.1/gcc_64/include/QtCore/qdebug.h:44,
                     from LowPassFilter.h:3,
                     from LowPassFilter.cpp:1:
    /opt/Qt/5.13.1/gcc_64/include/QtCore/qcompilerdetection.h:223:41: error: expected constructor, destructor, or type conversion before ‘(’ token
     #    define Q_DECL_IMPORT     __declspec(dllimport)
                                             ^
    /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:360:27: note: in expansion of macro ‘Q_DECL_IMPORT’
     #    define Q_CORE_EXPORT Q_DECL_IMPORT
                               ^~~~~~~~~~~~~
    /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:414:1: note: in expansion of macro ‘Q_CORE_EXPORT’
     Q_CORE_EXPORT Q_DECL_CONST_FUNCTION const char *qVersion(void) Q_DECL_NOTHROW;
     ^~~~~~~~~~~~~
    /opt/Qt/5.13.1/gcc_64/include/QtCore/qcompilerdetection.h:223:41: error: expected constructor, destructor, or type conversion before ‘(’ token
     #    define Q_DECL_IMPORT     __declspec(dllimport)
                                             ^
    /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:360:27: note: in expansion of macro ‘Q_DECL_IMPORT’
     #    define Q_CORE_EXPORT Q_DECL_IMPORT
                               ^~~~~~~~~~~~~
    /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:733:33: note: in expansion of macro ‘Q_CORE_EXPORT’
     Q_NORETURN Q_DECL_COLD_FUNCTION Q_CORE_EXPORT void qTerminate() Q_DECL_NOTHROW;
                                     ^~~~~~~~~~~~~
    /opt/Qt/5.13.1/gcc_64/include/QtCore/qcompilerdetection.h:223:41: error: expected constructor, destructor, or type conversion before ‘(’ token
     #    define Q_DECL_IMPORT     __declspec(dllimport)
                                             ^
    /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:360:27: note: in expansion of macro ‘Q_DECL_IMPORT’
     #    define Q_CORE_EXPORT Q_DECL_IMPORT
                               ^~~~~~~~~~~~~
    /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:741:1: note: in expansion of macro ‘Q_CORE_EXPORT’
     Q_CORE_EXPORT Q_DECL_CONST_FUNCTION bool qSharedBuild() Q_DECL_NOTHROW;
     ^~~~~~~~~~~~~
    /opt/Qt/5.13.1/gcc_64/include/QtCore/qcompilerdetection.h:223:41: error: expected constructor, destructor, or type conversion before ‘(’ token
     #    define Q_DECL_IMPORT     __declspec(dllimport)
                                             ^
    /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:360:27: note: in expansion of macro ‘Q_DECL_IMPORT’
     #    define Q_CORE_EXPORT Q_DECL_IMPORT
                               ^~~~~~~~~~~~~
    /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:778:1: note: in expansion of macro ‘Q_CORE_EXPORT’
     Q_CORE_EXPORT QString qt_error_string(int errorCode = -1);
     ^~~~~~~~~~~~~
    /opt/Qt/5.13.1/gcc_64/include/QtCore/qcompilerdetection.h:223:41: error: expected constructor, destructor, or type conversion before ‘(’ token
     #    define Q_DECL_IMPORT     __declspec(dllimport)
                                             ^
    /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:360:27: note: in expansion of macro ‘Q_DECL_IMPORT’
     #    define Q_CORE_EXPORT Q_DECL_IMPORT
                               ^~~~~~~~~~~~~
    /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:784:1: note: in expansion of macro ‘Q_CORE_EXPORT’
     Q_CORE_EXPORT void qt_assert(const char *assertion, const char *file, int line) Q_DECL_NOTHROW;
     ^~~~~~~~~~~~~
    /opt/Qt/5.13.1/gcc_64/include/QtCore/qcompilerdetection.h:223:41: error: expected constructor, destructor, or type conversion before ‘(’ token
     #    define Q_DECL_IMPORT     __declspec(dllimport)
                                             ^
    /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:360:27: note: in expansion of macro ‘Q_DECL_IMPORT’
     #    define Q_CORE_EXPORT Q_DECL_IMPORT
                               ^~~~~~~~~~~~~
    /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:802:1: note: in expansion of macro ‘Q_CORE_EXPORT’
     Q_CORE_EXPORT void qt_assert_x(const char *where, const char *what, const char *file, int line) Q_DECL_NOTHROW;
     ^~~~~~~~~~~~~
    /opt/Qt/5.13.1/gcc_64/include/QtCore/qcompilerdetection.h:223:41: error: expected constructor, destructor, or type conversion before ‘(’ token
     #    define Q_DECL_IMPORT     __declspec(dllimport)
                                             ^
    /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:360:27: note: in expansion of macro ‘Q_DECL_IMPORT’
     #    define Q_CORE_EXPORT Q_DECL_IMPORT
                               ^~~~~~~~~~~~~
    /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:812:12: note: in expansion of macro ‘Q_CORE_EXPORT’
     Q_NORETURN Q_CORE_EXPORT void qt_check_pointer(const char *, int) Q_DECL_NOTHROW;
                ^~~~~~~~~~~~~
    /opt/Qt/5.13.1/gcc_64/include/QtCore/qcompilerdetection.h:223:41: error: expected constructor, destructor, or type conversion before ‘(’ token
     #    define Q_DECL_IMPORT     __declspec(dllimport)
                                             ^
    /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:360:27: note: in expansion of macro ‘Q_DECL_IMPORT’
     #    define Q_CORE_EXPORT Q_DECL_IMPORT
                               ^~~~~~~~~~~~~
    /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:814:1: note: in expansion of macro ‘Q_CORE_EXPORT’
     Q_CORE_EXPORT void qBadAlloc();
     ^~~~~~~~~~~~~
    

    any suggestion how can I solve this error?
    any module do i need to Install in Linux?

    JonBJ 1 Reply Last reply
    0
    • Y Yash001

      Hello,

      I am using Ubuntu OS 18.04.3 and Qt 5.13.1.

      Here compiler output:

      In file included from /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:105:0,
                       from /opt/Qt/5.13.1/gcc_64/include/QtCore/qalgorithms.h:43,
                       from /opt/Qt/5.13.1/gcc_64/include/QtCore/qdebug.h:44,
                       from LowPassFilter.h:3,
                       from LowPassFilter.cpp:1:
      /opt/Qt/5.13.1/gcc_64/include/QtCore/qcompilerdetection.h:223:41: error: expected constructor, destructor, or type conversion before ‘(’ token
       #    define Q_DECL_IMPORT     __declspec(dllimport)
                                               ^
      /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:360:27: note: in expansion of macro ‘Q_DECL_IMPORT’
       #    define Q_CORE_EXPORT Q_DECL_IMPORT
                                 ^~~~~~~~~~~~~
      /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:414:1: note: in expansion of macro ‘Q_CORE_EXPORT’
       Q_CORE_EXPORT Q_DECL_CONST_FUNCTION const char *qVersion(void) Q_DECL_NOTHROW;
       ^~~~~~~~~~~~~
      /opt/Qt/5.13.1/gcc_64/include/QtCore/qcompilerdetection.h:223:41: error: expected constructor, destructor, or type conversion before ‘(’ token
       #    define Q_DECL_IMPORT     __declspec(dllimport)
                                               ^
      /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:360:27: note: in expansion of macro ‘Q_DECL_IMPORT’
       #    define Q_CORE_EXPORT Q_DECL_IMPORT
                                 ^~~~~~~~~~~~~
      /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:733:33: note: in expansion of macro ‘Q_CORE_EXPORT’
       Q_NORETURN Q_DECL_COLD_FUNCTION Q_CORE_EXPORT void qTerminate() Q_DECL_NOTHROW;
                                       ^~~~~~~~~~~~~
      /opt/Qt/5.13.1/gcc_64/include/QtCore/qcompilerdetection.h:223:41: error: expected constructor, destructor, or type conversion before ‘(’ token
       #    define Q_DECL_IMPORT     __declspec(dllimport)
                                               ^
      /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:360:27: note: in expansion of macro ‘Q_DECL_IMPORT’
       #    define Q_CORE_EXPORT Q_DECL_IMPORT
                                 ^~~~~~~~~~~~~
      /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:741:1: note: in expansion of macro ‘Q_CORE_EXPORT’
       Q_CORE_EXPORT Q_DECL_CONST_FUNCTION bool qSharedBuild() Q_DECL_NOTHROW;
       ^~~~~~~~~~~~~
      /opt/Qt/5.13.1/gcc_64/include/QtCore/qcompilerdetection.h:223:41: error: expected constructor, destructor, or type conversion before ‘(’ token
       #    define Q_DECL_IMPORT     __declspec(dllimport)
                                               ^
      /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:360:27: note: in expansion of macro ‘Q_DECL_IMPORT’
       #    define Q_CORE_EXPORT Q_DECL_IMPORT
                                 ^~~~~~~~~~~~~
      /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:778:1: note: in expansion of macro ‘Q_CORE_EXPORT’
       Q_CORE_EXPORT QString qt_error_string(int errorCode = -1);
       ^~~~~~~~~~~~~
      /opt/Qt/5.13.1/gcc_64/include/QtCore/qcompilerdetection.h:223:41: error: expected constructor, destructor, or type conversion before ‘(’ token
       #    define Q_DECL_IMPORT     __declspec(dllimport)
                                               ^
      /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:360:27: note: in expansion of macro ‘Q_DECL_IMPORT’
       #    define Q_CORE_EXPORT Q_DECL_IMPORT
                                 ^~~~~~~~~~~~~
      /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:784:1: note: in expansion of macro ‘Q_CORE_EXPORT’
       Q_CORE_EXPORT void qt_assert(const char *assertion, const char *file, int line) Q_DECL_NOTHROW;
       ^~~~~~~~~~~~~
      /opt/Qt/5.13.1/gcc_64/include/QtCore/qcompilerdetection.h:223:41: error: expected constructor, destructor, or type conversion before ‘(’ token
       #    define Q_DECL_IMPORT     __declspec(dllimport)
                                               ^
      /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:360:27: note: in expansion of macro ‘Q_DECL_IMPORT’
       #    define Q_CORE_EXPORT Q_DECL_IMPORT
                                 ^~~~~~~~~~~~~
      /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:802:1: note: in expansion of macro ‘Q_CORE_EXPORT’
       Q_CORE_EXPORT void qt_assert_x(const char *where, const char *what, const char *file, int line) Q_DECL_NOTHROW;
       ^~~~~~~~~~~~~
      /opt/Qt/5.13.1/gcc_64/include/QtCore/qcompilerdetection.h:223:41: error: expected constructor, destructor, or type conversion before ‘(’ token
       #    define Q_DECL_IMPORT     __declspec(dllimport)
                                               ^
      /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:360:27: note: in expansion of macro ‘Q_DECL_IMPORT’
       #    define Q_CORE_EXPORT Q_DECL_IMPORT
                                 ^~~~~~~~~~~~~
      /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:812:12: note: in expansion of macro ‘Q_CORE_EXPORT’
       Q_NORETURN Q_CORE_EXPORT void qt_check_pointer(const char *, int) Q_DECL_NOTHROW;
                  ^~~~~~~~~~~~~
      /opt/Qt/5.13.1/gcc_64/include/QtCore/qcompilerdetection.h:223:41: error: expected constructor, destructor, or type conversion before ‘(’ token
       #    define Q_DECL_IMPORT     __declspec(dllimport)
                                               ^
      /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:360:27: note: in expansion of macro ‘Q_DECL_IMPORT’
       #    define Q_CORE_EXPORT Q_DECL_IMPORT
                                 ^~~~~~~~~~~~~
      /opt/Qt/5.13.1/gcc_64/include/QtCore/qglobal.h:814:1: note: in expansion of macro ‘Q_CORE_EXPORT’
       Q_CORE_EXPORT void qBadAlloc();
       ^~~~~~~~~~~~~
      

      any suggestion how can I solve this error?
      any module do i need to Install in Linux?

      JonBJ Online
      JonBJ Online
      JonB
      wrote on last edited by
      #2

      @Yash001 said in How can I solve this error ?:
      __declspec(dllimport) is used when compiling under Windows, and for MSVC only I think. So somehow I think that is what your compilation has been configured for?

      Y 1 Reply Last reply
      2
      • JonBJ JonB

        @Yash001 said in How can I solve this error ?:
        __declspec(dllimport) is used when compiling under Windows, and for MSVC only I think. So somehow I think that is what your compilation has been configured for?

        Y Offline
        Y Offline
        Yash001
        wrote on last edited by
        #3

        @JonB Thank you sir, you right.

        I did mistake in .pro file. I mention DEFINE like below.
        DEFINES += WIN64 SQUIDSTATELIBRARY_LIB. To solve this error replace I replace to DEFINES += SQUIDSTATELIBRARY_LIB and it is work.

        I don't know some how it is work on mac, but on Linux it was giving me error.

        Thank you.

        1 Reply Last reply
        1

        • Login

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