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. Unable to compile: OpenSSL header missing
QtWS25 Last Chance

Unable to compile: OpenSSL header missing

Scheduled Pinned Locked Moved Solved General and Desktop
13 Posts 6 Posters 3.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.
  • K Offline
    K Offline
    kish1212
    wrote on 26 Feb 2019, 07:54 last edited by JKSH
    #1

    [EDIT: Replaced title with something shorter and more descriptive --JKSH]
    [THREAD LOCKED: Duplicate of https://forum.qt.io/topic/100135/qt-lan-messenger-compiling-and-build-error/]

    In file included from ..\src\tcpnetwork.h:35:0,
    from ..\src\tcpnetwork.cpp:26:
    ..\src\crypto.h:27:26: fatal error: openssl/rand.h: No such file or directory
    In file included from ..\src\udpnetwork.h:36:0,
    from ..\src\udpnetwork.cpp:26:
    ..\src\crypto.h:27:26: fatal error: openssl/rand.h: No such file or directory
    compilation terminated.
    compilation terminated.
    In file included from ..\src\udpnetwork.h:36:0,
    from ..\src\network.h:32,
    from ..\src\network.cpp:26:
    ..\src\crypto.h:27:26: fatal error: openssl/rand.h: No such file or directory
    compilation terminated.
    mingw32-make: *** [udpnetwork.o] Error 1
    mingw32-make: *** Waiting for unfinished jobs....
    mingw32-make: *** [tcpnetwork.o] Error 1
    mingw32-make: *** [network.o] Error 1
    Makefile:6954: recipe for target 'udpnetwork.o' failed
    Makefile:7449: recipe for target 'tcpnetwork.o' failed
    Makefile:8294: recipe for target 'network.o' failed
    13:16:32: The process "C:\Qt\Tools\mingw530_32\bin\mingw32-make.exe" exited with code 2.
    Error while building/deploying project lmc (kit: Desktop Qt 5.11.0 MinGW 32bit)
    When executing step "Make"
    13:16:32: Elapsed time: 00:20.

    J 1 Reply Last reply 26 Feb 2019, 08:11
    0
    • K kish1212
      26 Feb 2019, 07:54

      [EDIT: Replaced title with something shorter and more descriptive --JKSH]
      [THREAD LOCKED: Duplicate of https://forum.qt.io/topic/100135/qt-lan-messenger-compiling-and-build-error/]

      In file included from ..\src\tcpnetwork.h:35:0,
      from ..\src\tcpnetwork.cpp:26:
      ..\src\crypto.h:27:26: fatal error: openssl/rand.h: No such file or directory
      In file included from ..\src\udpnetwork.h:36:0,
      from ..\src\udpnetwork.cpp:26:
      ..\src\crypto.h:27:26: fatal error: openssl/rand.h: No such file or directory
      compilation terminated.
      compilation terminated.
      In file included from ..\src\udpnetwork.h:36:0,
      from ..\src\network.h:32,
      from ..\src\network.cpp:26:
      ..\src\crypto.h:27:26: fatal error: openssl/rand.h: No such file or directory
      compilation terminated.
      mingw32-make: *** [udpnetwork.o] Error 1
      mingw32-make: *** Waiting for unfinished jobs....
      mingw32-make: *** [tcpnetwork.o] Error 1
      mingw32-make: *** [network.o] Error 1
      Makefile:6954: recipe for target 'udpnetwork.o' failed
      Makefile:7449: recipe for target 'tcpnetwork.o' failed
      Makefile:8294: recipe for target 'network.o' failed
      13:16:32: The process "C:\Qt\Tools\mingw530_32\bin\mingw32-make.exe" exited with code 2.
      Error while building/deploying project lmc (kit: Desktop Qt 5.11.0 MinGW 32bit)
      When executing step "Make"
      13:16:32: Elapsed time: 00:20.

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 26 Feb 2019, 08:11 last edited by jsulm
      #2

      @kish1212 Hi and welcome!

      First: do not put the description of your problem into the title!
      Then you should provide more information. You even didn't say what project you're building!
      Back to your problem: it looks like the project needs OpenSSL library and header files. You will need to download OpenSSL first.

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

      K 1 Reply Last reply 26 Feb 2019, 08:26
      6
      • K Offline
        K Offline
        kish1212
        wrote on 26 Feb 2019, 08:13 last edited by
        #3

        i have download openssl i build it but. i am getting same error.

        1 Reply Last reply
        0
        • J jsulm
          26 Feb 2019, 08:11

          @kish1212 Hi and welcome!

          First: do not put the description of your problem into the title!
          Then you should provide more information. You even didn't say what project you're building!
          Back to your problem: it looks like the project needs OpenSSL library and header files. You will need to download OpenSSL first.

          K Offline
          K Offline
          kish1212
          wrote on 26 Feb 2019, 08:26 last edited by
          #4

          @jsulm i am building LAN Messenger which is a open source, my problem is not compiling and getting error is NOsuch file or directory

          J 1 Reply Last reply 26 Feb 2019, 08:30
          0
          • K kish1212
            26 Feb 2019, 08:26

            @jsulm i am building LAN Messenger which is a open source, my problem is not compiling and getting error is NOsuch file or directory

            J Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 26 Feb 2019, 08:30 last edited by
            #5

            @kish1212 Is it qmake based project? Can you post the pro file?

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

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kish1212
              wrote on 26 Feb 2019, 08:36 last edited by
              #6

              sure Jsulm

              see below for .pro file

              #-------------------------------------------------

              LAN Messenger project file

              #-------------------------------------------------

              QT += core gui network xml widgets sql

              unix: QT += multimedia
              macx: QT += multimedia

              win32: TARGET = lmc
              unix: TARGET = lan-messenger
              macx: TARGET = "LAN-Messenger"
              TEMPLATE = app

              INCLUDEPATH += ../../OpenSSL-Win32/include/openssl

              LIBS += ../OpenSSL-Win32/lib/MinGW

              RESOURCES = resource.qrc

              SOURCES +=
              usertreewidget.cpp
              udpnetwork.cpp
              transferwindow.cpp
              transferlistview.cpp
              tcpnetwork.cpp
              strings.cpp
              soundplayer.cpp
              shared.cpp
              settingsdialog.cpp
              settings.cpp
              network.cpp
              netstreamer.cpp
              messagingproc.cpp
              messaging.cpp
              message.cpp
              mainwindow.cpp
              main.cpp
              lmc.cpp
              imagepickeraction.cpp
              imagepicker.cpp
              historywindow.cpp
              history.cpp
              helpwindow.cpp
              filemodelview.cpp
              datagram.cpp
              crypto.cpp
              chatwindow.cpp
              broadcastwindow.cpp
              aboutdialog.cpp
              xmlmessage.cpp
              chathelper.cpp
              theme.cpp
              messagelog.cpp
              updatewindow.cpp
              webnetwork.cpp
              userinfowindow.cpp
              chatroomwindow.cpp
              userselectdialog.cpp
              subcontrols.cpp
              trace.cpp
              filemessagingproc.cpp
              qmessagebrowser.cpp

              HEADERS +=
              usertreewidget.h
              uidefinitions.h
              udpnetwork.h
              transferwindow.h
              transferlistview.h
              tcpnetwork.h
              strings.h
              soundplayer.h
              shared.h
              settingsdialog.h
              settings.h
              resource.h
              network.h
              netstreamer.h
              messaging.h
              message.h
              mainwindow.h
              lmc.h
              imagepickeraction.h
              imagepicker.h
              historywindow.h
              historytreewidget.h
              helpwindow.h
              filemodelview.h
              chatwindow.h
              chatdefinitions.h
              broadcastwindow.h
              history.h
              stdlocation.h
              definitions.h
              datagram.h
              crypto.h
              aboutdialog.h
              xmlmessage.h
              chathelper.h
              theme.h
              messagelog.h
              updatewindow.h
              webnetwork.h
              userinfowindow.h
              chatroomwindow.h
              userselectdialog.h
              subcontrols.h
              trace.h
              qmessagebrowser.h

              FORMS +=
              transferwindow.ui
              settingsdialog.ui
              mainwindow.ui
              historywindow.ui
              helpwindow.ui
              chatwindow.ui
              broadcastwindow.ui
              aboutdialog.ui
              updatewindow.ui
              userinfowindow.ui
              chatroomwindow.ui
              userselectdialog.ui

              TRANSLATIONS +=
              en_US.ts
              ml_IN.ts
              fr_FR.ts
              de_DE.ts
              tr_TR.ts
              es_ES.ts
              ko_KR.ts
              bg_BG.ts
              ro_RO.ts
              ar_SA.ts
              sl_SI.ts
              pt_BR.ts
              ru_RU.ts
              it_IT.ts
              sv_SE.ts

              win32: RC_FILE = lmcwin32.rc
              macx: ICON = lmc.icns

              win32-msvc* {
              QMAKE_LFLAGS_RELEASE += /MAP
              QMAKE_CFLAGS_RELEASE += /Zi
              QMAKE_CFLAGS_RELEASE += /FAcs
              QMAKE_CXXFLAGS_RELEASE += /Zi
              QMAKE_CXXFLAGS_RELEASE += /FAcs
              QMAKE_LFLAGS_RELEASE += /debug /opt:ref
              }

              win32: {
              CONFIG -= debug_and_release debug_and_release_target
              LMCAPP_PATH = $$replace(OUT_PWD, lmc, lmcapp)
              LIBS += -L$$LMCAPP_PATH -llmcapp
              }
              unix:!symbian: {
              CONFIG(debug, debug|release) {
              DESTDIR = ../debug
              } else {
              DESTDIR = ../release
              }
              LIBS += -L$$PWD/../../lmcapp/lib/ -llmcapp
              }

              INCLUDEPATH += $$PWD/../../lmcapp/include
              DEPENDPATH += $$PWD/../../lmcapp/include

              win32-msvc*: LIBS += advapi32.lib # for GetUserNameW(...) in Helper::getLogonName(..)
              win32: LIBS += -L$$PWD/../../openssl/lib/ -llibeay32
              unix:!symbian: LIBS += -L$$PWD/../../openssl/lib/ -lcrypto

              INCLUDEPATH += $$PWD/../../openssl/include
              DEPENDPATH += $$PWD/../../openssl/include

              DISTFILES +=
              ../../../../../../../OpenSSL-Win32/bin/lmcapp.dll

              win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../../OpenSSL-Win32/lib/MinGW/ -leay32
              else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../../OpenSSL-Win32/lib/MinGW/ -leay32d
              else:unix: LIBS += -L$$PWD/../../../../../../../OpenSSL-Win32/lib/MinGW/ -leay32

              INCLUDEPATH += $$PWD/../../../../../../../OpenSSL-Win32/lib/MinGW
              DEPENDPATH += $$PWD/../../../../../../../OpenSSL-Win32/lib/MinGW

              J 1 Reply Last reply 26 Feb 2019, 08:58
              0
              • K kish1212
                26 Feb 2019, 08:36

                sure Jsulm

                see below for .pro file

                #-------------------------------------------------

                LAN Messenger project file

                #-------------------------------------------------

                QT += core gui network xml widgets sql

                unix: QT += multimedia
                macx: QT += multimedia

                win32: TARGET = lmc
                unix: TARGET = lan-messenger
                macx: TARGET = "LAN-Messenger"
                TEMPLATE = app

                INCLUDEPATH += ../../OpenSSL-Win32/include/openssl

                LIBS += ../OpenSSL-Win32/lib/MinGW

                RESOURCES = resource.qrc

                SOURCES +=
                usertreewidget.cpp
                udpnetwork.cpp
                transferwindow.cpp
                transferlistview.cpp
                tcpnetwork.cpp
                strings.cpp
                soundplayer.cpp
                shared.cpp
                settingsdialog.cpp
                settings.cpp
                network.cpp
                netstreamer.cpp
                messagingproc.cpp
                messaging.cpp
                message.cpp
                mainwindow.cpp
                main.cpp
                lmc.cpp
                imagepickeraction.cpp
                imagepicker.cpp
                historywindow.cpp
                history.cpp
                helpwindow.cpp
                filemodelview.cpp
                datagram.cpp
                crypto.cpp
                chatwindow.cpp
                broadcastwindow.cpp
                aboutdialog.cpp
                xmlmessage.cpp
                chathelper.cpp
                theme.cpp
                messagelog.cpp
                updatewindow.cpp
                webnetwork.cpp
                userinfowindow.cpp
                chatroomwindow.cpp
                userselectdialog.cpp
                subcontrols.cpp
                trace.cpp
                filemessagingproc.cpp
                qmessagebrowser.cpp

                HEADERS +=
                usertreewidget.h
                uidefinitions.h
                udpnetwork.h
                transferwindow.h
                transferlistview.h
                tcpnetwork.h
                strings.h
                soundplayer.h
                shared.h
                settingsdialog.h
                settings.h
                resource.h
                network.h
                netstreamer.h
                messaging.h
                message.h
                mainwindow.h
                lmc.h
                imagepickeraction.h
                imagepicker.h
                historywindow.h
                historytreewidget.h
                helpwindow.h
                filemodelview.h
                chatwindow.h
                chatdefinitions.h
                broadcastwindow.h
                history.h
                stdlocation.h
                definitions.h
                datagram.h
                crypto.h
                aboutdialog.h
                xmlmessage.h
                chathelper.h
                theme.h
                messagelog.h
                updatewindow.h
                webnetwork.h
                userinfowindow.h
                chatroomwindow.h
                userselectdialog.h
                subcontrols.h
                trace.h
                qmessagebrowser.h

                FORMS +=
                transferwindow.ui
                settingsdialog.ui
                mainwindow.ui
                historywindow.ui
                helpwindow.ui
                chatwindow.ui
                broadcastwindow.ui
                aboutdialog.ui
                updatewindow.ui
                userinfowindow.ui
                chatroomwindow.ui
                userselectdialog.ui

                TRANSLATIONS +=
                en_US.ts
                ml_IN.ts
                fr_FR.ts
                de_DE.ts
                tr_TR.ts
                es_ES.ts
                ko_KR.ts
                bg_BG.ts
                ro_RO.ts
                ar_SA.ts
                sl_SI.ts
                pt_BR.ts
                ru_RU.ts
                it_IT.ts
                sv_SE.ts

                win32: RC_FILE = lmcwin32.rc
                macx: ICON = lmc.icns

                win32-msvc* {
                QMAKE_LFLAGS_RELEASE += /MAP
                QMAKE_CFLAGS_RELEASE += /Zi
                QMAKE_CFLAGS_RELEASE += /FAcs
                QMAKE_CXXFLAGS_RELEASE += /Zi
                QMAKE_CXXFLAGS_RELEASE += /FAcs
                QMAKE_LFLAGS_RELEASE += /debug /opt:ref
                }

                win32: {
                CONFIG -= debug_and_release debug_and_release_target
                LMCAPP_PATH = $$replace(OUT_PWD, lmc, lmcapp)
                LIBS += -L$$LMCAPP_PATH -llmcapp
                }
                unix:!symbian: {
                CONFIG(debug, debug|release) {
                DESTDIR = ../debug
                } else {
                DESTDIR = ../release
                }
                LIBS += -L$$PWD/../../lmcapp/lib/ -llmcapp
                }

                INCLUDEPATH += $$PWD/../../lmcapp/include
                DEPENDPATH += $$PWD/../../lmcapp/include

                win32-msvc*: LIBS += advapi32.lib # for GetUserNameW(...) in Helper::getLogonName(..)
                win32: LIBS += -L$$PWD/../../openssl/lib/ -llibeay32
                unix:!symbian: LIBS += -L$$PWD/../../openssl/lib/ -lcrypto

                INCLUDEPATH += $$PWD/../../openssl/include
                DEPENDPATH += $$PWD/../../openssl/include

                DISTFILES +=
                ../../../../../../../OpenSSL-Win32/bin/lmcapp.dll

                win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../../OpenSSL-Win32/lib/MinGW/ -leay32
                else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../../OpenSSL-Win32/lib/MinGW/ -leay32d
                else:unix: LIBS += -L$$PWD/../../../../../../../OpenSSL-Win32/lib/MinGW/ -leay32

                INCLUDEPATH += $$PWD/../../../../../../../OpenSSL-Win32/lib/MinGW
                DEPENDPATH += $$PWD/../../../../../../../OpenSSL-Win32/lib/MinGW

                J Offline
                J Offline
                jsulm
                Lifetime Qt Champion
                wrote on 26 Feb 2019, 08:58 last edited by
                #7

                @kish1212 said in Hi i am kishore i have project from github and i download the source and i m compiling i getting an error please find the below attachement and give the solution:

                INCLUDEPATH += ../../OpenSSL-Win32/include/openssl

                You need to adjust this line to match your OpenSSL installation.
                Same for this line:

                LIBS += ../OpenSSL-Win32/lib/MinGW
                

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

                1 Reply Last reply
                3
                • K Offline
                  K Offline
                  kish1212
                  wrote on 26 Feb 2019, 09:49 last edited by
                  #8

                  @jsulm said in Hi i am kishore i have project from github and i download the source and i m compiling i getting an error please find the below attachement and give the solution:

                  LIBS += ../OpenSSL-Win32/lib/MinGW
                  I added this line but again i m getting the same error..

                  J 1 Reply Last reply 26 Feb 2019, 11:31
                  0
                  • K kish1212
                    26 Feb 2019, 09:49

                    @jsulm said in Hi i am kishore i have project from github and i download the source and i m compiling i getting an error please find the below attachement and give the solution:

                    LIBS += ../OpenSSL-Win32/lib/MinGW
                    I added this line but again i m getting the same error..

                    J Offline
                    J Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on 26 Feb 2019, 11:31 last edited by
                    #9

                    @kish1212 As I said you probably need to adjust the path (use absolute path instead of relative to make sure it is correct).
                    And what about INCLUDEPATH?

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

                    1 Reply Last reply
                    1
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 26 Feb 2019, 20:59 last edited by
                      #10

                      Hi,

                      Isn't this thread a duplicate of this one ?

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

                      mrjjM kshegunovK 2 Replies Last reply 26 Feb 2019, 21:37
                      1
                      • SGaistS SGaist
                        26 Feb 2019, 20:59

                        Hi,

                        Isn't this thread a duplicate of this one ?

                        mrjjM Offline
                        mrjjM Offline
                        mrjj
                        Lifetime Qt Champion
                        wrote on 26 Feb 2019, 21:37 last edited by
                        #11

                        @SGaist
                        yes it is.

                        1 Reply Last reply
                        0
                        • SGaistS SGaist
                          26 Feb 2019, 20:59

                          Hi,

                          Isn't this thread a duplicate of this one ?

                          kshegunovK Offline
                          kshegunovK Offline
                          kshegunov
                          Moderators
                          wrote on 26 Feb 2019, 22:43 last edited by
                          #12

                          @SGaist said in Hi i am kishore i have project from github and i download the source and i m compiling i getting an error please find the below attachement and give the solution:

                          Isn't this thread a duplicate of this one ?

                          @mrjj said in Hi i am kishore i have project from github and i download the source and i m compiling i getting an error please find the below attachement and give the solution:

                          @SGaist
                          yes it is.

                          So, shall we put it down, then?

                          Read and abide by the Qt Code of Conduct

                          JKSHJ 1 Reply Last reply 26 Feb 2019, 22:45
                          0
                          • kshegunovK kshegunov
                            26 Feb 2019, 22:43

                            @SGaist said in Hi i am kishore i have project from github and i download the source and i m compiling i getting an error please find the below attachement and give the solution:

                            Isn't this thread a duplicate of this one ?

                            @mrjj said in Hi i am kishore i have project from github and i download the source and i m compiling i getting an error please find the below attachement and give the solution:

                            @SGaist
                            yes it is.

                            So, shall we put it down, then?

                            JKSHJ Offline
                            JKSHJ Offline
                            JKSH
                            Moderators
                            wrote on 26 Feb 2019, 22:45 last edited by JKSH
                            #13

                            [THREAD LOCKED: Duplicate of https://forum.qt.io/topic/100135/qt-lan-messenger-compiling-and-build-error/]

                            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                            1 Reply Last reply
                            3

                            2/13

                            26 Feb 2019, 08:11

                            topic:navigator.unread, 11
                            • Login

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