[uClinux-dev] HTTPS library in uCLinux
Tiberiu Motoc
tiberiu.motoc at gmail.com
Fri Nov 16 07:58:21 EST 2007
Hi Erwin,
I have another problem now: I cannot link my program to libcurl.
This is what I have in my Makefile:
all: me
me: me.o httpslib.o
$(CC) -Xlinker -z -Xlinker muldefs $(LDFLAGS)
-L/home/motoct/uClinux-dist/lib/libcurl/compiled/lib
-L/home/motoct/uClinux-dist/lib/libssl/compiled/lib -o $@ me.o
httpslib.o -lcurl -lssl $(LDLIBS)
httpslib.o: httpslib.c
$(CC) $(LDFLAGS)
-I/home/motoct/uClinux-dist/lib/libcurl/compiled/include/
-I/home/motoct/uClinux-dist/lib/libssl/compiled/include/ httpslib.c
First of all, it complains that it cannot build httpslib.o, because I
guess I don't know how to properly provide the header file directories
to the compile command (so what I have in the above paragraph is no
good). But I can solve this, by cd-ing to that directory and running
the arm-elf-gcc command manually. So, now that I have the httpslib.o
file, I re-try make. Unfortunately, I get a bunch of errors, like:
messenger.elf2flt(.text+0x1d50): In function `dprintf_DollarString':
: undefined reference to `__ctype_b'
messenger.elf2flt(.text+0x5954): In function `Curl_nonblock':
: undefined reference to `fcntl64'
messenger.elf2flt(.text+0x5980): In function `Curl_nonblock':
: undefined reference to `fcntl64'
messenger.elf2flt(.text+0x59a8): In function `Curl_nonblock':
: undefined reference to `fcntl64'
messenger.elf2flt(.text+0x8f20): In function `alarmfunc':
: undefined reference to `siglongjmp'
messenger.elf2flt(.text+0xe284): In function `CreateConnection':
: undefined reference to `__ctype_b'
messenger.elf2flt(.text+0x10780): In function `rand_enough':
: undefined reference to `RAND_status'
messenger.elf2flt(.text+0x107fc): In function `random_the_seed':
: undefined reference to `RAND_load_file'
messenger.elf2flt(.text+0x10860): In function `random_the_seed':
: undefined reference to `RAND_egd'
messenger.elf2flt(.text+0x108fc): In function `random_the_seed':
: undefined reference to `RAND_add'
messenger.elf2flt(.text+0x10914): In function `random_the_seed':
: undefined reference to `RAND_status'
messenger.elf2flt(.text+0x10944): In function `random_the_seed':
: undefined reference to `RAND_file_name'
messenger.elf2flt(.text+0x10960): In function `random_the_seed':
: undefined reference to `RAND_load_file'
messenger.elf2flt(.text+0x10ae0): In function `cert_stuff':
: undefined reference to `SSL_CTX_set_default_passwd_cb_userdata'
messenger.elf2flt(.text+0x10aec): In function `cert_stuff':
: undefined reference to `SSL_CTX_set_default_passwd_cb'
messenger.elf2flt(.text+0x10b3c): In function `cert_stuff':
: undefined reference to `SSL_CTX_use_certificate_chain_file'
messenger.elf2flt(.text+0x10b70): In function `cert_stuff':
: undefined reference to `SSL_CTX_use_certificate_file'
messenger.elf2flt(.text+0x10bb4): In function `cert_stuff':
: undefined reference to `fopen64'
messenger.elf2flt(.text+0x10bec): In function `cert_stuff':
: undefined reference to `d2i_PKCS12_fp'
messenger.elf2flt(.text+0x10c00): In function `cert_stuff':
: undefined reference to `PKCS12_PBE_add'
messenger.elf2flt(.text+0x10c24): In function `cert_stuff':
What am I doing wrong? Do I have to statically link to the libcurl
libray? How do I do that? I tried -static, --static-lgcc, etc.,
including the "-Xlinker -z -Xlinker muldefs" option that I found on
the Internet.
By the way, I know that you didn't use ssl, so I tried building
libcurl without ssl and then take out the link to ssl in the Makefile
and I still have the same errors (but fewer).
Thanks,
Tiberiu
More information about the uClinux-dev
mailing list