[maemo-developers] The code using Libcurl can not be linked properly
From: Yao Wang yaowang.bupt at gmail.comDate: Wed Oct 22 05:05:04 EEST 2008
- Previous message: The code using Libcurl can not be linked properly
- Next message: gstreamer on CHINOOK
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thank you for your advices. I have fixed the problem according to guidelines you provided. On Mon, Oct 20, 2008 at 7:05 AM, Eero Tamminen <eero.tamminen at nokia.com>wrote: > Hi, > > ext Yao Wang wrote: > >> Everyone. I am developping an appliacation on CHINOOK. >> Because my code used some functions provided by Libcurl, I revised the >> Makefile to the following >> >> CC = gcc >>> >>> CFLAGS = `pkg-config --cflags gtk+-2.0 hildon-1` -ansi -Wall -ggdb >>> >>> CFLAGS_CURL = -I/scratchbox/devkits/maemo3-tools/include >>> >>> LIBS = `pkg-config --libs gtk+-2.0 hildon-1` >>> >>> LIB_CURL = -L/scratchbox/devkits/maemo3-tools/lib -lcurl -Wl,-rpath >>> -Wl,/scratchbox/host_shared/lib/ -Wl,-rpath -Wl,/scratchbox/tools/lib/ >>> -Wl,-rpath -Wl,/scratchbox/devkits/maemo3-tools/lib/ >>> -L/scratchbox/devkits/maemo3-tools/lib -lidn -lssl -lcrypto -ldl -lssl >>> -lcrypto -ldl -lz >>> >> > You should never mix stuff for the target and stuff from the Scratchbox > itself like this. > > > TARGET = GalleryBrowser >>> >>> SOURCES = src/main.c src/xxxx.c >>> >>> $(TARGET): $(SOURCES) >>> $(CC) -o $(TARGET) $(SOURCES) $(CFLAGS) $(CFLAGS_CURL) $(LIBS) >>> $(LIB_CURL) >>> >>> >> The CFLAGS_CURL and LIB_CURL are generated by curl-config. >> >> After compiling and linking, I got a error messege same as following link: >> >> https://bugs.maemo.org/show_bug.cgi?id=2261#add_comment >> >> Unfortuantely, no solution is provided in this page. >> > > Just remove the curl-config from Scratchbox installation (as host tools > override target tools for performance reasons) and install curl -dev > package to your Scratchbox target. > > > Someone in this page mentioned to remove -lidn. When I removed the -lidn, >> the linking process is OK. However, if I run the program, I will get a >> error >> messge: >> >> " relocation error: /scratchbox/host_shared/lib/libc.so.6: symbol >> _dl_starting_up, version GLIBC_PRIVATE not defined in file ld-linux.so.2 >> with link time reference" >> > > You're mixing libraries that bring in different C-libraries, > the x86 Scratchbox target one, and the Scratchbox x86 host tools one. > > > - Eero > > > > Thus, is there anyone who can help me? >> >> Thanks in advance. >> > > -- Sincerely yours, Yao Wang Mobile Life Lab Beijing University of Posts & Telecommunications -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20081021/3cce599e/attachment.htm
- Previous message: The code using Libcurl can not be linked properly
- Next message: gstreamer on CHINOOK
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]