Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who is Online
63 user(s) are online (5 user(s) are browsing Forum)

Members: 0
Guests: 63

more...


Browsing this Thread:   1 Anonymous Users






Re: Linking a simple libcurl C Program
#6
Quite a regular
Quite a regular


See User information
@salass00 that is helpful, thank you.

@ncafferkey that's pretty much my day job too...

Cheers!


Posted on: 2018/3/17 17:33
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Linking a simple libcurl C Program
#5
Home away from home
Home away from home


See User information
@remotenemesis

You could use something like:

i386-aros-readelf -s <static library> | grep <symbol>

or:

i386-aros-objdump -t <static library> | grep <symbol>

To check if a library defines the symbol.

Posted on: 2018/3/16 20:02
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Linking a simple libcurl C Program
#4
Home away from home
Home away from home


See User information
Quote:

remotenemesis wrote:

Is there a better process than trial and error to find which libs to link?


Google the missing symbols?

Posted on: 2018/3/16 19:07
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Linking a simple libcurl C Program
#3
Quite a regular
Quite a regular


See User information
That helped, thanks!

Through a little trial and error I discovered I needed "gcc foo.c -lcurl -lssl -lcrypto -lz -o foo".

Is there a better process than trial and error to find which libs to link?

Posted on: 2018/3/14 15:09
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: Linking a simple libcurl C Program
#2
Home away from home
Home away from home


See User information
You probably need to link with -lcrypto instead of (or possibly as well as) -lssl.

Posted on: 2018/3/14 9:53
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Linking a simple libcurl C Program
#1
Quite a regular
Quite a regular


See User information
I'm trying to learn libcurl and I'm having trouble getting even simple file to link in AROS.

#include <curl/curl.h>

int main()
{
curl_global_init(CURL_GLOBAL_ALL);
}

And when I compile with "gcc foo.c -lcurl -o foo" I'm hit with a list of undefined symbols like:

RAND_load_file
UI_method_method_closer
SSL_CTX_use_certificate
UI_method_get_reader
X509_load_crl_file

My first guess was to try also linking with -lssl but that didn't work either.

Is anyone able to set me on the right path?





Posted on: 2018/3/14 4:56
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 







You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
4462
2 nikolaos
nikolaos
4206
3 magorium
magorium
4095
4 phoenixkonsole
phoenixkonsole
3942
5 deadwood
deadwood
2917
6 ncafferkey
ncafferkey
2810
7 mazze
mazze
2222
8 Kalamatee
Kalamatee
2212
9 clusteruk
clusteruk
2114
Powered by XOOPS © 2001-2025 The XOOPS Project