[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libcaca] Re: undefined reference
- To: libcaca@lists.zoy.org
- Subject: [libcaca] Re: undefined reference
- From: BlackCode <[[REDACTED]]@gmail.com>
- Date: Tue, 18 Mar 2008 19:19:50 +0000
- Delivered-to: list-libcaca@zoy.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=/5wh6xVQMaPzOoPhqbsy7oeIEvYL93BPXA23WJ36KkE=; b=epvKAa09zQi/H8T+I5aV4uTj+oqoCPHwGSYMUJGHAYjA2Js1CNDyq+04l0xcpduRUxt2jTCpj4VfjfHgNLzIhiayUHfLwK6D2lhfXtWfZGXU3wZjqqQwLbSFiLkSF3SH/goo+ZFkReJxbFzvZaaDd2qMTfKfprjLDhH+u0qqnME=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=CK+yAUXF7r/n1hemo7kWOzmBDeDjC5rjvOE5K2SvIjvEEUsiNzcjUbKQEJW91txyWqXx7A3wvYBxUfQNwR6nrZYuOtjtSHCtCtDIy4nASFHdQAtVLZ+FuX7MjqTubClQXeNZNEG1MnUyN6Ee1fdcVSXXvmRsgeTn4C/E5VrigQQ=
- In-reply-to: <b6b2e5b60803180747w675286d2ub0aab63e335ba75@mail.gmail.com>
- References: <b6b2e5b60803180747w675286d2ub0aab63e335ba75@mail.gmail.com>
- Reply-to: libcaca@lists.zoy.org
- Sender: libcaca-bounce@lists.zoy.org
Risolved on irc chan :)
2008/3/18, BlackCode <[[REDACTED]]@gmail.com>:
> I've a stupid problems when compiling this simple code:
>
> /*
> * caca_test.1.c simple libcaca program
> * authors blackcode
> * email [[REDACTED]][at]gmail[dot]com
> *
> * description:
> * a basic example about the use of libcaca
> */
> #include <cucul.h>
> #include <caca.h>
> int main(void)
> {
> int x,y;
> x=0; y=0;
>
> cucul_canvas_t *cv; caca_display_t *dp; caca_event_t *events;
> cv = cucul_create_canvas(80,24);
>
> if(!cv)
> {
> printf("errore nella creazione di canvas!\n");
> return 1;
> }
>
> dp = caca_create_display(cv);
> if(!dp)
> {
> printf("errore nella creazione del display!\n");
> return 1;
> }
>
> caca_set_display_title(dp, "example 1");
> cucul_set_color_ansi(cv, cucul_black, cucul_white);
> cucul_put_str(cv, 40, 12, "this is a message");
> caca_refresh_display(dp);
> while(1)
> {
> caca_event_t ev;
> int ret = caca_get_event(dp, caca_event_any, &ev, -1);
> if(!ret)
> continue;
>
> if(caca_get_event_type(&ev) & caca_event_mouse_motion)
> {
>
> x=caca_get_event_mouse_x(ev);
> y=caca_get_event_mouse_y(ev);
>
> }
>
> caca_refresh_display(dp);
> cucul_put_str(cv, x,y, "lo0o00oo0ol");
> }
> caca_free_display(dp);
> return 0;
>
> }
>
> miky@tux ~ $ gcc `pkg-config --libs --cflags cucul caca` example.c -o example
> example.c: In function 'main':
> example.c:21: warning: incompatible implicit declaration of built-in
> function 'printf'
> example.c:28: warning: incompatible implicit declaration of built-in
> function 'printf'
> /tmp/ccwdvZ7X.o: In function `main':
> example.c:(.text+0x110): undefined reference to `caca_get_event_type'
> example.c:(.text+0x13e): undefined reference to `caca_get_event_mouse_x'
> example.c:(.text+0x168): undefined reference to `caca_get_event_mouse_y'
> collect2: ld returned 1 exit status
>
> uff :( thanks in advance, i'm a newbie of libcaca
>
>
> --
> Michele
> http://newmainframe.wordpress.com
>
--
http://newmainframe.wordpress.com
--
This is the libcaca mailing-list, see http://libcaca.zoy.org/
Trouble unsubscribing? Please contact <sam@zoy.org>
List archives are at http://libcaca.zoy.org/list/