LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-24-2006, 04:54 PM   #1
neily
LQ Newbie
 
Registered: Sep 2006
Posts: 4

Rep: Reputation: 0
a compiling question


I tried to use <openssl/evp.h> and included it in the program, but when compiling it, I got the information like this:
In function main, undefined reference to 'EVP_CIPHER_CTX_init'....
I saw openssl library folder exsiting in /lib/ and have all the .h file in it, but why can't the program reference to them? how can I solve this?
Waiting to your reply and thank you so much!
 
Old 09-24-2006, 05:13 PM   #2
demon_vox
Member
 
Registered: May 2006
Location: Argentina
Distribution: SuSE 10
Posts: 173

Rep: Reputation: 30
Hi,
I havent used that library, but the error you are getting is not from the compiler, but from the linkers (sutil difference I know).
What you are missing is telling the GCC which library he has to link to. So you need to find out what is it called and then add the -lLIBRARYNAME to your compile/link line.

I hope this is useful.
Cheers!
 
Old 09-25-2006, 04:45 AM   #3
Flesym
Member
 
Registered: Aug 2005
Location: Germany
Distribution: Ubuntu, Debian
Posts: 189

Rep: Reputation: 31
As 'demon_vox' said, you have to link against the proper library. In this case it is most likely libssl.*. So compile with the flag: -lssl
 
Old 10-05-2006, 04:20 PM   #4
neily
LQ Newbie
 
Registered: Sep 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Thank you very much, demon_vox, Flesym. It does work!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling Question dudeman41465 Linux - Software 2 09-21-2006 08:44 AM
compiling 2.6.8.1 question noxious Slackware 11 09-29-2004 04:34 PM
compiling question glo Linux - Newbie 0 07-28-2003 10:50 AM
Compiling Question fotoguy Linux - Software 0 05-24-2003 04:41 AM
Compiling Question Bigun Linux - Software 2 01-03-2003 03:39 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration