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

2008-06-17 Thread Gerhard Gappmeier
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 Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]


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

2008-06-16 Thread vinni rathore
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


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

2008-06-16 Thread karim Bendadda
Could you post the message given you by the compiler??

On Mon, Jun 16, 2008 at 9:51 AM, vinni rathore [EMAIL PROTECTED] 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


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

2008-06-16 Thread Vijay Kotari
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 [EMAIL PROTECTED] 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


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

2008-06-16 Thread vinni rathore
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 [EMAIL PROTECTED]
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 [EMAIL PROTECTED]
 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