OpenSSL projects in VC2008

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tan

    OpenSSL projects in VC2008

    Hi folk,

    I'm trying to install latest OpenSSL version in VS2008 Express Edition
    on WinXP. I have downloaded and installed the redistributable for VC+
    +2008 (including SP1), and also installed the latest version of pre-compiled
    version of OpenSSL from /www.shiningligh tpro.com/products/
    Win32OpenSSL.ht ml website. So AFAIK there is no need for Perl script
    compilation and NASM, MASM issue as long as I have the pre-compiled
    binaries. If I'm mistaken please correct me? I'm sure that I have set
    VC++2008
    search directory/path and Additional dependency directory
    properly(ssleay 32MT.lib, libeay32MD.lib, etc..). But when i run the code,
    even with the simple code as that


    #include "stdafx.h"
    #include "stdlib.h"
    #include "winsock.h"
    //OPENSSL INCLUSION HEADERS
    #include "openssl/ssl.h"
    #include <openssl/ssl3.h>
    #include <openssl/x509.h>
    #include <openssl/err.h>
    #include <openssl/crypto.h>


    int _tmain(int argc, _TCHAR* argv[])
    {
    printf("New console application has been created\n");



    }


    I get many linker errors, it seems at the start of the line,
    libeay32MT.lib is loaded but probelm with bss_sock.obj, cryptlib exist.
    Those
    errors and fuctions seems like Win native functions (such as
    GetDesktopWindo w, MessageBoxA etc) don't think they are related with
    OpenSSL..

    1>libeay32MT.li b(bss_sock.obj) : error LNK2001: unresolved external symbol
    _closesocket@4
    1>libeay32MT.li b(cryptlib.obj) : error LNK2001: unresolved external symbol
    mp__GetUserObje ctInformationW@ 20
    1>libeay32MT.li b(cryptlib.obj) : error LNK2001: unresolved external symbol
    _imp__GetProces sWindowStation@ 0
    1>libeay32MT.li b(cryptlib.obj) : error LNK2001: unresolved external symbol
    __imp__GetDeskt opWindow@0
    1>libeay32MT.li b(cryptlib.obj) : error LNK2001: unresolved external symbol
    __imp__MessageB oxA@16
    1>libeay32MT.li b(cryptlib.obj) : error LNK2001: unresolved external symbol
    __imp__Deregist erEventSource@4
    1>libeay32MT.li b(cryptlib.obj) : error LNK2001: unresolved external symbol
    __imp__ReportEv entA@36
    1>libeay32MT.li b(cryptlib.obj) : error LNK2001: unresolved external symbol
    __imp__Register EventSourceA@8
    ..

    Probably something is still not completed (or not implemented) with VC2008
    causing these errors.

    Any help will be appreciated.
    Best Regards,



  • Giovanni Dicanio

    #2
    Re: OpenSSL projects in VC2008


    "Tan" <noname@hotmail .comha scritto nel messaggio
    news:OR7PkWmGJH A.2232@TK2MSFTN GP04.phx.gbl...
    I get many linker errors, it seems at the start of the line,
    libeay32MT.lib is loaded but probelm with bss_sock.obj, cryptlib exist.
    Those
    errors and fuctions seems like Win native functions (such as
    GetDesktopWindo w, MessageBoxA etc) don't think they are related with
    OpenSSL..
    Functions like GetDesktopWindo w() are defined in User32.dll, and you should
    link with user32.lib.

    I don't know about VC++ 2008 Express, but this is done automatically with
    commercial VS2008 editions, like VS2008 Professional.

    Giovanni

    Comment

    • Tan

      #3
      Re: OpenSSL projects in VC2008

      I agree, it made me think that something is malfunctioning in VC2008 EE due
      to the fact it's a beta version. I'll play around a bit more to make sure
      that probelm is VC2008 EE related.

      One more thing to clarify, at Project Settings->Linker
      tab->Input ->Additional Dependecy in "inherited values" i can't see the
      user32.lib, gdi32.lib, kernel32.lib etc.. as well. So I made the linking
      manually( still not sure that /LIBPATH: precedence should be used or not
      before the library name) but this time the lib's reside in <C:\Program
      Files\Microsoft SDKs\Windows\v6 .0A\Librather than <C:\Program
      Files\Microsoft Visual Studio 9.0\VC\liblocat ion. Do you think that's
      normal ?

      thnx in advance,



      "Giovanni Dicanio" <giovanniDOTdic anio@REMOVEMEgm ail.comwrote in message
      news:OgHr8DoGJH A.1156@TK2MSFTN GP05.phx.gbl...
      >
      "Tan" <noname@hotmail .comha scritto nel messaggio
      news:OR7PkWmGJH A.2232@TK2MSFTN GP04.phx.gbl...
      >
      >I get many linker errors, it seems at the start of the line,
      >libeay32MT.l ib is loaded but probelm with bss_sock.obj, cryptlib exist.
      >Those
      >errors and fuctions seems like Win native functions (such as
      >GetDesktopWind ow, MessageBoxA etc) don't think they are related with
      >OpenSSL..
      >
      Functions like GetDesktopWindo w() are defined in User32.dll, and you
      should link with user32.lib.
      >
      I don't know about VC++ 2008 Express, but this is done automatically with
      commercial VS2008 editions, like VS2008 Professional.
      >
      Giovanni
      >
      >

      Comment

      • Giovanni Dicanio

        #4
        Re: OpenSSL projects in VC2008


        "Tan" <noname@hotmail .comha scritto nel messaggio
        news:%23qNnUaoG JHA.3884@TK2MSF TNGP02.phx.gbl. ..
        >it made me think that something is malfunctioning in VC2008 EE due to the
        >fact it's a beta version.
        VS2008 EE is no more in beta... instead, you can already download the SP1
        (which I would suggest you to do).
        I'll play around a bit more to make sure that probelm is VC2008 EE
        related.
        I would suggest you to try to create a trivial Win32 applications and see
        what happens...
        Then, if that builds fine, you can add OpenSL files.
        lib's reside in <C:\Program Files\Microsoft SDKs\Windows\v6 .0A\Librather
        than <C:\Program Files\Microsoft Visual Studio 9.0\VC\liblocat ion. Do
        you think that's normal ?
        I think the Win32 Platform SDK is installed in a different sub-tree than
        VS2008 EE, so I think that your path should be OK...

        Giovanni


        Comment

        • Tan

          #5
          Re: OpenSSL projects in VC2008

          I suppose the problem is solved, still dubious cause didn't check the full
          functioning but one way or the other eliminated the library or dll(of course
          with adding the #pragma comment(lib, "ws2_32.lib ") ) linking, from now it
          can't be a big deal I think. Actually required libraries for OpenSSL were
          slightly in the different folder :)

          thnx in advance,

          "Giovanni Dicanio" <giovanniDOTdic anio@REMOVEMEgm ail.comwrote in message
          news:O0LdZCpGJH A.1308@TK2MSFTN GP02.phx.gbl...
          >
          "Tan" <noname@hotmail .comha scritto nel messaggio
          news:%23qNnUaoG JHA.3884@TK2MSF TNGP02.phx.gbl. ..
          >
          >>it made me think that something is malfunctioning in VC2008 EE due to the
          >>fact it's a beta version.
          >
          VS2008 EE is no more in beta... instead, you can already download the SP1
          (which I would suggest you to do).
          >
          >I'll play around a bit more to make sure that probelm is VC2008 EE
          >related.
          >
          I would suggest you to try to create a trivial Win32 applications and see
          what happens...
          Then, if that builds fine, you can add OpenSL files.
          >
          >lib's reside in <C:\Program Files\Microsoft SDKs\Windows\v6 .0A\Lib>
          >rather than <C:\Program Files\Microsoft Visual Studio 9.0\VC\lib>
          >location. Do you think that's normal ?
          >
          I think the Win32 Platform SDK is installed in a different sub-tree than
          VS2008 EE, so I think that your path should be OK...
          >
          Giovanni
          >
          >
          >

          Comment

          Working...