linking errors on linux........! - Openssl

This is a discussion on linking errors on linux........! - Openssl ; hi.... i m getting undefined symbol for my sample server program that is on linux. my program is using openssl apis. i have installed the openssl 0.9.8g version on the red hat machine everything got sucess but still getting the ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: linking errors on linux........!

  1. linking errors on linux........!

    hi....
    i m getting undefined symbol for my sample server program that is on linux.
    my program is using openssl apis.
    i have installed the openssl 0.9.8g version on the red hat machine
    everything got sucess but still getting the linking errors.
    steps that i followed:
    1- config
    2. make
    3. make install

    finally when i tried my sample with gcc compiler it gives the undefined
    symbol errors.
    like : undefined reference to SSL_library_init.

    plz reply as soon as possible.
    thnx in advance.

    --
    regards,
    Vineeta Kumari
    Software engg
    Mobera Systems
    Chandigarh


  2. Re: linking errors on linux........!

    Could you post the message given you by the compiler??

    On Mon, Jun 16, 2008 at 9:51 AM, vinni rathore wrote:

    > hi....
    > i m getting undefined symbol for my sample server program that is on linux.
    > my program is using openssl apis.
    > i have installed the openssl 0.9.8g version on the red hat machine
    > everything got sucess but still getting the linking errors.
    > steps that i followed:
    > 1- config
    > 2. make
    > 3. make install
    >
    > finally when i tried my sample with gcc compiler it gives the undefined
    > symbol errors.
    > like : undefined reference to SSL_library_init.
    >
    > plz reply as soon as possible.
    > thnx in advance.
    >
    > --
    > regards,
    > Vineeta Kumari
    > Software engg
    > Mobera Systems
    > Chandigarh





    --
    Karim


  3. Re: linking errors on linux........!

    Hi,

    Based on what you have shared, I believe you didn't link the library files
    required. You should use the -lssl option for this.
    i.e.

    root #: gcc sample_file.c -lssl

    This is of course assuming that Openssl installed without any incident as
    you have said. Also, if this is the first time that you are using OpenSSL,
    you should probably use the s_server and s_client programs that were given
    along with the openssl source package instead of some sample file as these
    programs work and hence remove any doubt associated with the correctness of
    the program itself.


    Regards,
    Vijay K.

    On Mon, Jun 16, 2008 at 1:21 PM, vinni rathore wrote:

    > hi....
    > i m getting undefined symbol for my sample server program that is on linux.
    > my program is using openssl apis.
    > i have installed the openssl 0.9.8g version on the red hat machine
    > everything got sucess but still getting the linking errors.
    > steps that i followed:
    > 1- config
    > 2. make
    > 3. make install
    >
    > finally when i tried my sample with gcc compiler it gives the undefined
    > symbol errors.
    > like : undefined reference to SSL_library_init.
    >
    > plz reply as soon as possible.
    > thnx in advance.
    >
    > --
    > regards,
    > Vineeta Kumari
    > Software engg
    > Mobera Systems
    > Chandigarh



  4. Re: linking errors on linux........!

    Thnx for ur reply Mr. Vijay

    I have a question .. as there are two libraries in case of Windows :
    Libeay32.lib and SSLeay32.lib
    so the same libraries are for linux or something different in case of linux.
    Sorry for this basic question as i m very much new to Linux for openssl.

    Thnx and Regards,
    Vinni

    On Mon, Jun 16, 2008 at 2:25 PM, Vijay Kotari
    wrote:

    > Hi,
    >
    > Based on what you have shared, I believe you didn't link the library files
    > required. You should use the -lssl option for this.
    > i.e.
    >
    > root #: gcc sample_file.c -lssl
    >
    > This is of course assuming that Openssl installed without any incident as
    > you have said. Also, if this is the first time that you are using OpenSSL,
    > you should probably use the s_server and s_client programs that were given
    > along with the openssl source package instead of some sample file as these
    > programs work and hence remove any doubt associated with the correctness of
    > the program itself.
    >
    >
    > Regards,
    > Vijay K.
    >
    > On Mon, Jun 16, 2008 at 1:21 PM, vinni rathore
    > wrote:
    >
    >> hi....
    >> i m getting undefined symbol for my sample server program that is on
    >> linux. my program is using openssl apis.
    >> i have installed the openssl 0.9.8g version on the red hat machine
    >> everything got sucess but still getting the linking errors.
    >> steps that i followed:
    >> 1- config
    >> 2. make
    >> 3. make install
    >>
    >> finally when i tried my sample with gcc compiler it gives the undefined
    >> symbol errors.
    >> like : undefined reference to SSL_library_init.
    >>
    >> plz reply as soon as possible.
    >> thnx in advance.
    >>
    >> --
    >> regards,
    >> Vineeta Kumari
    >> Software engg
    >> Mobera Systems
    >> Chandigarh

    >
    >
    >



    --
    regards,
    Vineeta Kumari
    Software engg
    Mobera Systems
    Chandigarh


  5. Re: linking errors on linux........!

    Hi..
    first of all thanx as I got success using -lssl option with my file but
    could you please give me the whole procedure that why the linking errors??
    how to link with the Library it needed .. i think in linux it require
    Libcrypto.so and libssl.so..
    please provide me the steps..
    thnx in advance
    regards,
    Vinni


    On Mon, Jun 16, 2008 at 5:19 PM, vinni rathore wrote:

    > Thnx for ur reply Mr. Vijay
    >
    > I have a question .. as there are two libraries in case of Windows :
    > Libeay32.lib and SSLeay32.lib
    > so the same libraries are for linux or something different in case of
    > linux. Sorry for this basic question as i m very much new to Linux for
    > openssl.
    >
    > Thnx and Regards,
    > Vinni
    >
    >
    > On Mon, Jun 16, 2008 at 2:25 PM, Vijay Kotari
    > wrote:
    >
    >> Hi,
    >>
    >> Based on what you have shared, I believe you didn't link the library files
    >> required. You should use the -lssl option for this.
    >> i.e.
    >>
    >> root #: gcc sample_file.c -lssl
    >>
    >> This is of course assuming that Openssl installed without any incident as
    >> you have said. Also, if this is the first time that you are using OpenSSL,
    >> you should probably use the s_server and s_client programs that were given
    >> along with the openssl source package instead of some sample file as these
    >> programs work and hence remove any doubt associated with the correctness of
    >> the program itself.
    >>
    >>
    >> Regards,
    >> Vijay K.
    >>
    >> On Mon, Jun 16, 2008 at 1:21 PM, vinni rathore
    >> wrote:
    >>
    >>> hi....
    >>> i m getting undefined symbol for my sample server program that is on
    >>> linux. my program is using openssl apis.
    >>> i have installed the openssl 0.9.8g version on the red hat machine
    >>> everything got sucess but still getting the linking errors.
    >>> steps that i followed:
    >>> 1- config
    >>> 2. make
    >>> 3. make install
    >>>
    >>> finally when i tried my sample with gcc compiler it gives the undefined
    >>> symbol errors.
    >>> like : undefined reference to SSL_library_init.
    >>>
    >>> plz reply as soon as possible.
    >>> thnx in advance.
    >>>
    >>> --
    >>> regards,
    >>> Vineeta Kumari
    >>> Software engg
    >>> Mobera Systems
    >>> Chandigarh

    >>
    >>
    >>

    >
    >
    > --
    > regards,
    > Vineeta Kumari
    > Software engg
    > Mobera Systems
    > Chandigarh
    >




    --
    regards,
    Vineeta Kumari
    Software engg
    Mobera Systems
    Chandigarh


  6. Re: linking errors on linux........!

    Specifying -lssl is sufficient.
    libssl depends on libcrypto and so will be automatically linked indirectly to
    your app.

    e.g. gcc main.c -lssl -o sample
    will work.

    On Monday 16 June 2008 15:13:19 vinni rathore wrote:
    > Hi..
    > first of all thanx as I got success using -lssl option with my file but
    > could you please give me the whole procedure that why the linking errors??
    > how to link with the Library it needed .. i think in linux it require
    > Libcrypto.so and libssl.so..
    > please provide me the steps..
    > thnx in advance
    > regards,
    > Vinni



    --
    mit freundlichen Grüßen / best regards

    Gerhard Gappmeier
    ascolab GmbH - automation system communication laboratory
    Tel.: +49 9131 691 123
    Fax: +49 9131 691 128
    Web: http://www.ascolab.com
    GPG-Key: http://www.ascolab.com/gpg/gg.asc
    __________________________________________________ ____________________
    OpenSSL Project http://www.openssl.org
    User Support Mailing List openssl-users@openssl.org
    Automated List Manager majordomo@openssl.org


+ Reply to Thread