Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6878813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:46:12+00:00 2026-05-27T04:46:12+00:00

In Ubuntu 11.10 x86_64 I have this this simple test.c file: #include <openssl/ssl.h> int

  • 0

In Ubuntu 11.10 x86_64 I have this this simple test.c file:

#include <openssl/ssl.h>

int main() {
    SSL_library_init();
    return 0;
}

Why does compiling with gcc fail?

$ gcc -lssl -lcrypto test.c
/tmp/ccqL6lRY.o: In function `main':
test.c:(.text+0x5): undefined reference to `SSL_library_init'
collect2: ld returned 1 exit status

Compiling with clang works and produces a working executable:

$ clang -lssl -lcrypto test.c
$ ldd a.out 
linux-vdso.so.1 =>  (0x00007fffa93e1000)
libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f234a24f000)
libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f2349ea0000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2349b00000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f23498fc000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f23496e4000)
/lib64/ld-linux-x86-64.so.2 (0x00007f234a4c4000
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T04:46:13+00:00Added an answer on May 27, 2026 at 4:46 am

    Try to put -lssl at the end (after test.c).

    $ gcc test.c -lssl -lcrypto
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do I install xf86-input-synaptics-1.5.99.901-2-x86_64.pkg.tar.xz in ubuntu 11 ? I have found the file
What could be wrong here? I have the following simple class: #include libmnl/libmnl.h int
Ubuntu Server 9.10, Here is my file, test.py import commands blkid = commands.getoutput('blkid') print
I have downloaded and installed locally on my Ubuntu ActiveState Perl(ActivePerl-5.14.1.1401-x86_64-linux-glibc-2.3.5-294969.tar.gz). I did ~$
I have python 2.5.1 installed on my Ubuntu 10.04 x86_64 machine. When i try
I have to call an executable file in Ubuntu... Just learned how to make
I am using PostgreSQL 9.1.3 (PostgreSQL 9.1.3 on x86_64-pc-linux-gnu, compiled by gcc-4.6.real (Ubuntu/Linaro 4.6.1-9ubuntu3)
On ubuntu I currently have haskell-platform 2011.2.0.1.2 installed, and I am currently working on
I have the following in configure.ac: AC_CHECK_PROGS(MAKE,$MAKE make gmake,error) if test x$MAKE = xerror
I have set up a private cloud under ubuntu 10.04 server through eucalyptus packages

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.