Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Why Qt creator say "use of undeclared identifier 'QSslSocket'", but it exists.
Forum Updated to NodeBB v4.3 + New Features

Why Qt creator say "use of undeclared identifier 'QSslSocket'", but it exists.

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
28 Posts 4 Posters 7.5k Views 2 Watching
  • 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.
  • SGaistS SGaist

    Can you provide the complete OpenSSL checks part ?

    S Offline
    S Offline
    senmx
    wrote on last edited by
    #21

    @SGaist Do you mean "make check"? In order to check whether the two files libssl_1_1_1.so and libcrypto_1_1_1.so can be used? These two files can be correctly linked to the android project and using , should be no problem.

    jsulmJ 1 Reply Last reply
    0
    • S senmx

      @SGaist Do you mean "make check"? In order to check whether the two files libssl_1_1_1.so and libcrypto_1_1_1.so can be used? These two files can be correctly linked to the android project and using , should be no problem.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #22

      @senmx said in Why Qt creator say "use of undeclared identifier 'QSslSocket'", but it exists.:

      Do you mean "make check"?

      No, the SSL check in config.log which is:

      loaded result for library config.qtbase_network.libraries.openssl
      Trying source 0 (type openssl) of library openssl ...
      + cd /home/sen/soft/qt-everywhere-src-5.15.1/config.tests/openssl && /home/sen/soft/qt-everywhere-src-5.15.1/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" -early "CONFIG += cross_compile" 'QMAKE_USE += openssl' 'QMAKE_LIBS_OPENSSL = -L/home/sen/github/c/openssl-1.1.1g -lssl -lcrypto' /home/sen/soft/qt-everywhere-src-5.15.1/config.tests/openssl
      + cd /home/sen/soft/qt-everywhere-src-5.15.1/config.tests/openssl && MAKEFLAGS= /usr/bin/make
      > /opt/android-sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -c -target aarch64-linux-android21 -fno-limit-debug-info -fPIC -fstack-protector-strong -DANDROID -O2 -fPIC  -I. -I/home/sen/soft/qt-everywhere-src-5.15.1/qtbase/mkspecs/android-clang -o main.o main.cpp
      > main.cpp:2:10: fatal error: 'openssl/ssl.h' file not found
      > #include <openssl/ssl.h>
      >          ^~~~~~~~~~~~~~~
      > 1 error generated.
      

      @SGaist

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #23

        From the looks of it, you did not provide the correct path to the where the includes are located.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        S 1 Reply Last reply
        0
        • SGaistS SGaist

          From the looks of it, you did not provide the correct path to the where the includes are located.

          S Offline
          S Offline
          senmx
          wrote on last edited by
          #24

          @SGaist Thanks, If this is the case, how to solve it? There are other header files that can't be found. The header file of openssl is under /usr/include.

          OPENSSL_LIBS='-L/home/sen/github/c/openssl-1.1.1g -lssl -lcrypto' ./configure -xplatform android-clang -prefix /usr/local/Qt-5.15.1-android --disable-rpath -nomake tests -nomake examples -android-ndk $ANDROID_NDK_HOME -android-sdk $AND    ROID_SDK_HOME -no-warnings-are-errors -openssl-linked
          
          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #25

            The headers in /usr/includes are usually the ones installed by official packages. Where are the ones from the version you built ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            S 1 Reply Last reply
            0
            • SGaistS SGaist

              The headers in /usr/includes are usually the ones installed by official packages. Where are the ones from the version you built ?

              S Offline
              S Offline
              senmx
              wrote on last edited by senmx
              #26

              @jsulm @SGaist
              I added the "-headerdir" is the same:

              ./configure -headerdir /home/sen/github/c/openssl-1.1.g/include ...
              

              I don't think this is the reason, because when the option openssl-linked is not enabled, the ./configure is successful, and these errors will also appear in the config.log.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #27

                -headerdir is for where the headers will be installed.

                Use the -I parameter to add other paths to look for headers.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                S 1 Reply Last reply
                1
                • SGaistS SGaist

                  -headerdir is for where the headers will be installed.

                  Use the -I parameter to add other paths to look for headers.

                  S Offline
                  S Offline
                  senmx
                  wrote on last edited by
                  #28

                  @SGaist Well, I have tried all these parameters, it is probably a bug, because I saw the same problem in the bug feedback area. I am using the lower version now, the installation version.

                  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