Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Solved unresolved external symbol from openssl, QT 5.8, visual studio 2015

    General and Desktop
    2
    4
    3624
    Loading More Posts
    • 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.
    • E
      echelon last edited by

      I am using the following configure line to compile QT 5.8 shared with visual studio 2015,

      ..\configure -confirm-license -prefix %QT_DIST% -mp -debug-and-release -icu -system-sqlite -I C:\Dev\dependencies\sqlite3\include -L C:\Dev\dependencies\sqlite3\lib -sql-odbc -sql-psql -I C:\Dev\postgresql\x64\include -L C:\Dev\postgresql\x64\lib -sql-mysql -I C:\Dev\mysql\x64\include -L C:\Dev\mysql\x64\lib -system-zlib -I C:\Dev\dependencies\zlib\include -L C:\Dev\dependencies\zlib\lib -system-libjpeg -I C:\Users\nameless\Documents\Works\Compiling\jpeg-9b -L C:\Users\nameless\Documents\Works\Compiling\jpeg-9b -system-libpng -I C:\Users\nameless\Documents\Works\Deps\x64\VS2015\libpng\Static\Debug\include -L C:\Users\nameless\Documents\Works\Deps\x64\VS2015\libpng\Static\Debug\lib -gif -ico -v -icu -qt-pcre -qt-freetype -nomake tests -opensource -openssl-linked -I C:\Users\nameless\Documents\Works\Deps\x64\VS2015\OpenSSL\Static\Debug\include -L C:\Users\nameless\Documents\Works\Deps\x64\VS2015\OpenSSL\Static\Debug\lib
      

      But it got stuck when linking the openssl libraries :

         Creating library ..\..\lib\Qt5Networkd.lib and object ..\..\lib\Qt5Networkd.exp
      libeay32.lib(cryptlib.obj) : error LNK2019: unresolved external symbol __imp_GetProcessWindowStation referenced in function OPENSSL_isservice
      libeay32.lib(cryptlib.obj) : error LNK2019: unresolved external symbol __imp_GetUserObjectInformationW referenced in function OPENSSL_isservice
      libeay32.lib(cryptlib.obj) : error LNK2019: unresolved external symbol __imp_MessageBoxW referenced in function OPENSSL_showfatal
      libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp_CreateCompatibleBitmap referenced in function readscreen
      libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp_DeleteObject referenced in function readscreen
      libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp_GetDeviceCaps referenced in function readscreen
      libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp_GetDIBits referenced in function readscreen
      libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp_GetObjectW referenced in function readscreen
      libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp_GetDC referenced in function readscreen
      libeay32.lib(rand_win.obj) : error LNK2019: unresolved external symbol __imp_ReleaseDC referenced in function readscreen
      ..\..\lib\Qt5Networkd.dll : fatal error LNK1120: 10 unresolved externals
      NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\link.EXE"' : return code '0x460'
      Stop.
      NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
      Stop.
      NMAKE : fatal error U1077: 'cd' : return code '0x2'
      Stop.
      NMAKE : fatal error U1077: 'cd' : return code '0x2'
      Stop.
      NMAKE : fatal error U1077: 'cd' : return code '0x2'
      Stop.
      

      Normally when i was compiling on 5.7.x i have just added "-l Gdi32 -l User32" to the configure line but as currently the new build system is not allowed such practice how to get around these linking error?.

      The openssl libs alread statically debug linked with those libraries, here is excerpt from the nt.mak openssl :

      EX_LIBS=ws2_32.lib gdi32.lib advapi32.lib crypt32.lib user32.lib
      
      mrjj 1 Reply Last reply Reply Quote 0
      • mrjj
        mrjj Lifetime Qt Champion @echelon last edited by mrjj

        @echelon
        Hi
        Looks like Gdi32.lib also needed ?

        Oh, just saw it.
        Hmm. Not that then.

        E 1 Reply Last reply Reply Quote 0
        • E
          echelon @mrjj last edited by echelon

          @mrjj said in unresolved external symbol from openssl, QT 5.8, visual studio 2015:

          Gdi32.lib

          Looks like for odd reasons, it seems gdi32.lib not statically linked into libeay32.lib, here is the full dumped of symbols my self compiled openssl.

          My steps to compiled static debug openssl is fairly simple :

          path=C:\Users\nameless\Documents\Tools\Nasm\x64;%PATH%;
          perl Configure debug-VC-WIN64A --prefix=C:\Users\nameless\Documents\Works\Deps\x64\VS2015\OpenSSL\Static\Debug no-shared experimental-jpake enable-md2 enable-rc5 enable-rfc3779 enable-ssl-trace enable-static-engine
          ms\do_win64a
          nmake -f ms\nt.mak
          nmake -f ms\nt.mak install
          
          1 Reply Last reply Reply Quote 0
          • E
            echelon last edited by

            This problem fixed by statically linked windows required libraries into the openssl library.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post