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. (SOLVED)Error compiling Qt 4.8.5 with Openssl
QtWS25 Last Chance

(SOLVED)Error compiling Qt 4.8.5 with Openssl

Scheduled Pinned Locked Moved Installation and Deployment
4 Posts 2 Posters 2.4k 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.
  • V Offline
    V Offline
    ViniciusCampanha
    wrote on last edited by
    #1

    Hello!

    When I try to compile Qt with the option "-openssl" I get the error below:

    fatal error c1083: cannot open include file: 'openssl/asn.h': No such file or directory

    Are my src files corrupted? Or is other thing?

    Thanks!

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

      Hi,

      No, but you need to provide openssl on your system for Qt to use it. Also add the include path and library path when configuring so it can find what it needs.

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

      1 Reply Last reply
      0
      • V Offline
        V Offline
        ViniciusCampanha
        wrote on last edited by
        #3

        Hello, very thanks SGalst!

        So I installed the Win64 OpenSSL v1.0.1e from "OpenSSL site":http://slproweb.com/products/Win32OpenSSL.html , add the -I and -L options in configure and ran in a vanilla code, like this:

        configure.exe -prefix C:/Qt/4.8.5_x64_msvc2008 -debug-and-release -platform win32-msvc2008 -qt-sql-sqlite -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-declarative -mp -nomake examples -nomake demos -nomake docs -openssl -I C:/OpenSSL-Win64/include -L C:/OpenSSL-Win64/lib

        After compile the Qt, I tested and it works great!

        Note:
        First I was putting the paths in configure with backslashes ( \ ), like it is in Windows, the configure works, but while compiling, it give me some errors:

        "...qmake.cache unescaped backslashes..."
        "..qtsqld4.exp qsqldatabase.obj error unresolved external symbol public: static..."

        Then I change all the paths with slashes ( / ) and the compiler works!

        Thanks!

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

          You're welcome

          Even on Windows, Qt works with / rather than \ or if you really need backslashes you would have to use \

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

          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