[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libcaca] undefined reference
- To: libcaca@lists.zoy.org
- Subject: [libcaca] undefined reference
- From: BlackCode <[[REDACTED]]@gmail.com>
- Date: Tue, 18 Mar 2008 14:47:39 +0000
- Delivered-to: list-libcaca@zoy.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=gwmlN9OOU83Lv7VlKPZYP2KD/e1WjF3NKSEDV2FYRUY=; b=KywOVrFvS31V1zLyfv3Wn219Oi8u/4/vUbtG1w8FRPLQN1VHHGd+YzhgaRsH+QC/G5pj5xjTcAPb4TDI+JdP25DLNJ4Ko3BXeybO94AJlqdzQxz4yo60c6t1cs9RpFay2P3fzPRtF7KnFtqAt67KaOpZyxT7OyuCOrATDNe2t24=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Z2JFFgL9VMrs5rIidEWrVaZLrs+H1Pz/mPKelwU7VLoLZvjqZj49xwokiqATjL4nSvZU+XpZRbDANwqSaA4dC6FuqLEPCOTKspaImIikYYnCcgNhKQwWxTYFJoMOijTDrhq5B5UELg4V5rmhdxGAaIiCiLxcUq/MoVjYuGj3vEE=
- Reply-to: libcaca@lists.zoy.org
- Sender: libcaca-bounce@lists.zoy.org
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
--
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/