Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. ssl/qsslcertificate.cpp:300:45: Error: illegal use of incomplete type‘struct X509’

ssl/qsslcertificate.cpp:300:45: Error: illegal use of incomplete type‘struct X509’

Scheduled Pinned Locked Moved Solved Installation and Deployment
7 Posts 2 Posters 1.5k 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.
  • D Offline
    D Offline
    duan
    wrote on last edited by duan
    #1
    g++ -c -include .pch/Qt5Network -pipe -msse2 -mfpmath=sse -O2 -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_USING_NAMESPACE -DQT_BUILD_NETWORK_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -I../../mkspecs/linux-g++ -I. -I../../include -I../../include/QtNetwork -I../../include/QtNetwork/5.3.2 -I../../include/QtNetwork/5.3.2/QtNetwork -Ikernel -I../../include/QtCore/5.3.2 -I../../include/QtCore/5.3.2/QtCore -I../../include/QtCore -I.moc -o .obj/qsslcertificate.o ssl/qsslcertificate.cpp
    ssl/qsslcertificate.cpp: In the member function‘QByteArray QSslCertificate::version() const’:
    ssl/qsslcertificate.cpp:288:68: Error: illegal use of incomplete type ‘struct X509’
    /usr/local/include/openssl/ossl_typ.h:120:16: Error: Forward declaration of‘struct X509’
    ssl/qsslcertificate.cpp: In the member function‘QByteArray QSslCertificate::serialNumber() const’:
    ssl/qsslcertificate.cpp:300:45: Error: illegal use of incomplete type‘struct X509’
    /usr/local/include/openssl/ossl_typ.h:120:16: Error: Forward declaration of‘struct X509’
    ssl/qsslcertificate.cpp: In the member function‘QSslKey QSslCertificate::publicKey() const’:
    ssl/qsslcertificate.cpp:565:32: Error: illegal use of incomplete type‘struct X509’
    /usr/local/include/openssl/ossl_typ.h:120:16: Error: Forward declaration of‘struct X509’
    ssl/qsslcertificate.cpp:569:29: Error: illegal use of incomplete type‘struct EVP_PKEY’
    /usr/local/include/openssl/ossl_typ.h:93:16: Error: Forward declaration of‘struct EVP_PKEY’
    ssl/qsslcertificate.cpp:573:36: Error: illegal use of incomplete type‘struct EVP_PKEY’
    /usr/local/include/openssl/ossl_typ.h:93:16: Error: Forward declaration of‘struct EVP_PKEY’
    ssl/qsslcertificate.cpp:577:36: Error: illegal use of incomplete type‘struct EVP_PKEY’
    /usr/local/include/openssl/ossl_typ.h:93:16: Error: Forward declaration of‘struct EVP_PKEY’
    gmake[3]: *** [.obj/qsslcertificate.o] Error 1
    gmake[3]: Leave the directory “/home/oneu/Downloads/qt-everywhere-opensource-src-5.3.2/qtbase/src/network”
    gmake[2]: *** [sub-network-make_first] Error 2
    gmake[2]: Leave the directory “/home/oneu/Downloads/qt-everywhere-opensource-src-5.3.2/qtbase/src”
    gmake[1]: *** [sub-src-make_first] Error 2
    gmake[1]: Leave the directory “/home/oneu/Downloads/qt-everywhere-opensource-src-5.3.2/qtbase”
    gmake: *** [module-qtbase-make_first] Error 2
    [root@localhost qt-everywhere-opensource-src-5.3.2]#
    
    1 Reply Last reply
    -1
    • Christian EhrlicherC Christian Ehrlicher

      Are you sure you don't have the header of openssl 1.1 installed? See https://bugreports.qt.io/browse/QTBUG-51553

      D Offline
      D Offline
      duan
      wrote on last edited by
      #7

      @Christian-Ehrlicher
      Thank you.

      My openssl installation directory is “/usr/local/ssl”, and the ”/usr/local/include/openssl directory” is not link to ”/usr/local/ssl”;
      It is ok to execute the following command, the fail passed.

      rm -rf /usr/local/include/openssl     ////////remove the directory 
      ln -s /usr/local/ssl/include/openssl /usr/local/include/openssl     ////////link /usr/local/include/openssl to openssl installation directory
      
      1 Reply Last reply
      0
      • Christian EhrlicherC Online
        Christian EhrlicherC Online
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by
        #2

        And what's your question? And no we can't read chinese (or whatever your locale is) - you have to write in english.

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        D 1 Reply Last reply
        0
        • Christian EhrlicherC Christian Ehrlicher

          And what's your question? And no we can't read chinese (or whatever your locale is) - you have to write in english.

          D Offline
          D Offline
          duan
          wrote on last edited by
          #3

          @Christian-Ehrlicher
          Thank you,
          when I make the code of QT5.3.2, error as follows:

          g++ -c -include .pch/Qt5Network -pipe -msse2 -mfpmath=sse -O2 -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_USING_NAMESPACE -DQT_BUILD_NETWORK_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -I../../mkspecs/linux-g++ -I. -I../../include -I../../include/QtNetwork -I../../include/QtNetwork/5.3.2 -I../../include/QtNetwork/5.3.2/QtNetwork -Ikernel -I../../include/QtCore/5.3.2 -I../../include/QtCore/5.3.2/QtCore -I../../include/QtCore -I.moc -o .obj/qsslcertificate.o ssl/qsslcertificate.cpp
          ssl/qsslcertificate.cpp: In the member function‘QByteArray QSslCertificate::version() const’:
          ssl/qsslcertificate.cpp:288:68: Error: illegal use of incomplete type ‘struct X509’
          /usr/local/include/openssl/ossl_typ.h:120:16: Error: Forward declaration of‘struct X509’
          ssl/qsslcertificate.cpp: In the member function‘QByteArray QSslCertificate::serialNumber() const’:
          ssl/qsslcertificate.cpp:300:45: Error: illegal use of incomplete type‘struct X509’
          /usr/local/include/openssl/ossl_typ.h:120:16: Error: Forward declaration of‘struct X509’
          ssl/qsslcertificate.cpp: In the member function‘QSslKey QSslCertificate::publicKey() const’:
          ssl/qsslcertificate.cpp:565:32: Error: illegal use of incomplete type‘struct X509’
          /usr/local/include/openssl/ossl_typ.h:120:16: Error: Forward declaration of‘struct X509’
          ssl/qsslcertificate.cpp:569:29: Error: illegal use of incomplete type‘struct EVP_PKEY’
          /usr/local/include/openssl/ossl_typ.h:93:16: Error: Forward declaration of‘struct EVP_PKEY’
          ssl/qsslcertificate.cpp:573:36: Error: illegal use of incomplete type‘struct EVP_PKEY’
          /usr/local/include/openssl/ossl_typ.h:93:16: Error: Forward declaration of‘struct EVP_PKEY’
          ssl/qsslcertificate.cpp:577:36: Error: illegal use of incomplete type‘struct EVP_PKEY’
          /usr/local/include/openssl/ossl_typ.h:93:16: Error: Forward declaration of‘struct EVP_PKEY’
          gmake[3]: *** [.obj/qsslcertificate.o] Error 1
          gmake[3]: Leave the directory “/home/oneu/Downloads/qt-everywhere-opensource-src-5.3.2/qtbase/src/network”
          gmake[2]: *** [sub-network-make_first] Error 2
          gmake[2]: Leave the directory “/home/oneu/Downloads/qt-everywhere-opensource-src-5.3.2/qtbase/src”
          gmake[1]: *** [sub-src-make_first] Error 2
          gmake[1]: Leave the directory “/home/oneu/Downloads/qt-everywhere-opensource-src-5.3.2/qtbase”
          gmake: *** [module-qtbase-make_first] Error 2
          [root@localhost qt-everywhere-opensource-src-5.3.2]#

          1 Reply Last reply
          0
          • Christian EhrlicherC Online
            Christian EhrlicherC Online
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #4

            What openssl version do you use?

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            D 1 Reply Last reply
            0
            • Christian EhrlicherC Christian Ehrlicher

              What openssl version do you use?

              D Offline
              D Offline
              duan
              wrote on last edited by
              #5

              @Christian-Ehrlicher
              Thank you .

              Development environment: Fedora 14, QT5.3.2, openssl1.0.2k;

              1 Reply Last reply
              0
              • Christian EhrlicherC Online
                Christian EhrlicherC Online
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on last edited by
                #6

                Are you sure you don't have the header of openssl 1.1 installed? See https://bugreports.qt.io/browse/QTBUG-51553

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                D 1 Reply Last reply
                0
                • Christian EhrlicherC Christian Ehrlicher

                  Are you sure you don't have the header of openssl 1.1 installed? See https://bugreports.qt.io/browse/QTBUG-51553

                  D Offline
                  D Offline
                  duan
                  wrote on last edited by
                  #7

                  @Christian-Ehrlicher
                  Thank you.

                  My openssl installation directory is “/usr/local/ssl”, and the ”/usr/local/include/openssl directory” is not link to ”/usr/local/ssl”;
                  It is ok to execute the following command, the fail passed.

                  rm -rf /usr/local/include/openssl     ////////remove the directory 
                  ln -s /usr/local/ssl/include/openssl /usr/local/include/openssl     ////////link /usr/local/include/openssl to openssl installation directory
                  
                  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