Re: libetpan and gcc
"DINH Viêt Hoà" <[email protected]> Thu, 15 Jan 2009 16:14:09 +0100
| Newsgroups | gmane.mail.libetpan.user |
|---|---|
| Message-ID | <[email protected]> |
see LD_LIBRARY_PATH and "man ld". On Thu, Jan 15, 2009 at 12:44 AM, Nicolas GHAZARIAN <[email protected]> wrote: > Thank you for this response, but i have a new problem: > > root@Projet2009:/home/nicolas/Projet# gcc -o test test.c `libetpan-config > --libs --cflags` > root@Projet2009:/home/nicolas/Projet# ./test > ./test: error while loading shared libraries: libetpan.so.13: cannot open > shared object file: No such file or directory > > About the mail server, it's a project for the last year of my studies. Th= is > is the reason for wich I have to build it. > > Bests regards, > > Nicolas GHAZARIAN > > -----Message d'origine----- > De : DINH Vi=EAt Ho=E0 [mailto:[email protected]] > Envoy=E9 : lundi 12 janvier 2009 00:58 > =C0 : Nicolas GHAZARIAN > Cc : [email protected] > Objet : Re: [Libetpan-users] libetpan and gcc > > you just need to link with libetpan > > gcc -o test test.c `libetpan-config --libs --cflags` > This library can be used to create a mail server. > Though, I think many mail servers already exist. > > On Sun, Jan 11, 2009 at 6:38 PM, Nicolas GHAZARIAN > <[email protected]> wrote: >> Hi, >> >> >> >> I've installed libetpan on Ubuntu with your instructions and I tried to >> compile one of your example, but gcc don't compile. >> >> >> >> Here the logs: >> >> gcc test.c >> >> /tmp/ccYP1KPo.o: In function `main': >> >> test.c:(.text+0x3d): undefined reference to `mailimf_mailbox_new' >> >> test.c:(.text+0x4b): undefined reference to `mailimf_mailbox_free' >> >> collect2: ld a retourn=C3(c) 1 code d'=C3(c)tat d'ex=C3(c)cution >> >> > -------------------------------------------------------------------------= --- > ------------------------------------------------- >> >> > -------------------------------------------------------------------------= --- > ------------------------------------------------- >> >> Code : >> >> #include <libetpan/libetpan.h> >> >> #include <string.h> >> >> >> >> int main(int argc, char ** argv) >> >> { >> >> struct mailimf_mailbox * mb; >> >> char* display_name; >> >> char* address; >> >> >> >> display_name =3D strdup("DINH =3D?iso-8859-1?Q?Vi=3DEAt_Ho=3DE0?=3D"); >> >> address =3D strdup("[email protected]"); >> >> mb =3D mailimf_mailbox_new(display_name, address); >> >> /* do the things */ >> >> mailimf_mailbox_free(mb); >> >> >> >> return 0; >> >> } >> >> >> >> /* display mailbox information */ >> >> >> >> #include <libetpan/libetpan.h> >> >> #include <stdio.h> >> >> >> >> void display_mailbox(struct mailimf_mailbox * mb) >> >> { >> >> if (mb->mb_display_name !=3D NULL) >> >> printf("display name: %s\n", mb->mb_display_name); >> >> printf("address specifier : %s\n", mb->mb_addr_spec); >> >> } >> >> > -------------------------------------------------------------------------= --- > ------------------------------------------------- >> >> > -------------------------------------------------------------------------= --- > ------------------------------------------------- >> >> >> >> I think the problem is that i don't know how use gcc with libetpan. Can > you >> explain me how to compile this code please ? >> >> >> >> In fine, is it a good library for create a mail server ? >> >> >> >> Best regards, > > > -- > DINH Vi=EAt Ho=E0 > > -- = DINH Vi=EAt Ho=E0 ---------------------------------------------------------------------------= --- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword