[maemo-developers] The code using Libcurl can not be linked properly

From: atul raut atul_raut17 at yahoo.co.in
Date: Mon Oct 20 12:50:56 EEST 2008
Hi Yao,

Just try this simpe one.

Add below line in your Make.am

INCLUDES = `pkg-config --cflags glib-2.0 gnome-vfs-2.0 hildon-1 libosso gtk+-2.0 libhildonmime libcurl`

projectname_LDFLAGS = `pkg-config --libs glib-2.0 gnome-vfs-2.0 hildon-1 libosso gtk+-2.0 libhildonmime sqlite3` -ldbus-1 -llocation -lcurl -linotifytools 

See curl flag and only add those flag on to your code it will work.

------------------------------------------------------------------------------------------------------------------  "You Never Get a Second Chance to Make First Good Impression"  Atul Raut    Hyderabad - 500 033         


--- On Mon, 20/10/08, Yao Wang <yaowang.bupt at gmail.com> wrote:

> From: Yao Wang <yaowang.bupt at gmail.com>
> Subject: The code using Libcurl can not be linked properly
> To: maemo-developers at maemo.org
> Date: Monday, 20 October, 2008, 2:42 PM
> Hi,
>     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
> >
> > 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.
> 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"
> 
> Thus, is there anyone who can help me?
> 
> Thanks in advance.
> 
> -- 
>          Sincerely yours,
> 
> Yao Wang
> 
> Mobile Life Lab
> Beijing University of Posts & Telecommunications
> _______________________________________________
> maemo-developers mailing list
> maemo-developers at maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers

Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php


More information about the maemo-developers mailing list