From: Johan V. <jo...@ge...> - 2002-12-30 14:56:54
|
* Johan Vervloet (jo...@ge...) wrote: > Hello, > > I installed allegro on my FreeBSD box, but I don't manage to link compiled executables. I think I found the answer on the website (changes since v. 4.0.0) * Shared libs fixed under FreeBSD. > > When I try to compile example 0422c from the vivace tutorial, I get > > bash$ gcc -I /usr/local/include/ -L /usr/local/lib 0422.c -lalleg > /usr/lib/crt1.o: In function `_start': > /usr/lib/crt1.o(.text+0x79): undefined reference to `main' > /tmp/cc0jkXxt.o: In function `_mangled_main': > /tmp/cc0jkXxt.o(.text+0x1c): undefined reference to `install_allegro' > /tmp/cc0jkXxt.o(.text+0x24): undefined reference to `install_keyboard' > /tmp/cc0jkXxt.o(.text+0x59): undefined reference to `readkey' > /tmp/cc0jkXxt.o(.text+0x71): undefined reference to `set_gfx_mode' > /tmp/cc0jkXxt.o(.text+0x82): undefined reference to `allegro_error' > /tmp/cc0jkXxt.o(.text+0xe1): undefined reference to `gfx_driver' > /tmp/cc0jkXxt.o(.text+0xe9): undefined reference to `gfx_driver' > /tmp/cc0jkXxt.o(.text+0x119): undefined reference to `gfx_driver' > /tmp/cc0jkXxt.o(.text+0x121): undefined reference to `gfx_driver' > /tmp/cc0jkXxt.o(.text+0x149): undefined reference to `screen' > /tmp/cc0jkXxt.o(.text+0x14f): undefined reference to `putpixel' > /tmp/cc0jkXxt.o(.text+0x161): undefined reference to `readkey' > /tmp/cc0jkXxt.o(.text+0x17c): undefined reference to `screen' > /tmp/cc0jkXxt.o(.text+0x182): undefined reference to `clear_to_color' > /tmp/cc0jkXxt.o(.text+0x18a): undefined reference to `readkey' > > Is there something special I should do when using allegro under FreeBSD ? > > Johan > > p.s. : I attached the example file to this mail. > > -- > Is er leven zonder Microsoft ? > http://www.gewestpallieter.be/~johan/ms-alt/ > #include <stdio.h> > #include <allegro.h> > > int main(void) > { > int i; > > allegro_init(); > > install_keyboard(); > > printf("\nThe program will show some dots, then wait a keypress.\n"); > printf("After sucesive keypresses the screen will be cleared to different colors\n"); > printf("\nPress any key to begin\n\n"); > > readkey(); > > if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { > printf("%s\n", allegro_error); > exit(1); > } > // Now prepare for some random dots... > > for (i = 0; i < 64000; i++) { > putpixel(screen, rand() % SCREEN_W, rand() % SCREEN_H, rand() % 256); > } > > readkey(); > > for (i = 0; i < 16; i++) { > clear_to_color(screen, i); > readkey(); > } > > return 0; > } > END_OF_MAIN(); > -- Is er leven zonder Microsoft ? http://www.gewestpallieter.be/~johan/ms-alt/ >From <all...@ca...> Mon Dec 30 06:59:00 2002 Received: from tartarus.telenet-ops.be [195.130.132.34] by canvaslink.com with ESMTP (SMTPD32-6.00) id AAB29E0A007E; Mon, 30 Dec 2002 06:14:58 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by tartarus.telenet-ops.be (Postfix) with SMTP id 81260DB992 for <al...@ca...>; Mon, 30 Dec 2002 12:12:12 +0100 (CET) Received: from gewestpallieter.be (D5761365.kabel.telenet.be [213.118.19.101]) by tartarus.telenet-ops.be (Postfix) with ESMTP id 27F90DBC16 for <al...@ca...>; Mon, 30 Dec 2002 12:12:12 +0100 (CET) Received: by gewestpallieter.be (Postfix, from userid 1001) id 5F204B57; Mon, 30 Dec 2002 12:12:12 +0100 (CET) Date: Mon, 30 Dec 2002 12:12:12 +0100 From: Johan Vervloet <jo...@ge...> To: al...@ca... Message-ID: <200...@jo...> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="TB36FDmn/VVEgNH/" Content-Disposition: inline User-Agent: Mutt/1.4i X-Editor: Elvis http://elvis.the-little-red-haired-girl.org/ X-Operating-System: FreeBSD/4.7-RELEASE (i386) X-Uptime: 12:06PM up 31 days, 3:50, 9 users, load averages: 0.43, 0.20, 0.08 Subject: [AL] allegro link errors (FreeBSD) Precedence: bulk Sender: all...@ca... Reply-To: al...@ca... X-UIDL: 340680749 Status: O Content-Length: 2536 Lines: 84 --TB36FDmn/VVEgNH/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, I installed allegro on my FreeBSD box, but I don't manage to link compiled executables. When I try to compile example 0422c from the vivace tutorial, I get bash$ gcc -I /usr/local/include/ -L /usr/local/lib 0422.c -lalleg /usr/lib/crt1.o: In function `_start': /usr/lib/crt1.o(.text+0x79): undefined reference to `main' /tmp/cc0jkXxt.o: In function `_mangled_main': /tmp/cc0jkXxt.o(.text+0x1c): undefined reference to `install_allegro' /tmp/cc0jkXxt.o(.text+0x24): undefined reference to `install_keyboard' /tmp/cc0jkXxt.o(.text+0x59): undefined reference to `readkey' /tmp/cc0jkXxt.o(.text+0x71): undefined reference to `set_gfx_mode' /tmp/cc0jkXxt.o(.text+0x82): undefined reference to `allegro_error' /tmp/cc0jkXxt.o(.text+0xe1): undefined reference to `gfx_driver' /tmp/cc0jkXxt.o(.text+0xe9): undefined reference to `gfx_driver' /tmp/cc0jkXxt.o(.text+0x119): undefined reference to `gfx_driver' /tmp/cc0jkXxt.o(.text+0x121): undefined reference to `gfx_driver' /tmp/cc0jkXxt.o(.text+0x149): undefined reference to `screen' /tmp/cc0jkXxt.o(.text+0x14f): undefined reference to `putpixel' /tmp/cc0jkXxt.o(.text+0x161): undefined reference to `readkey' /tmp/cc0jkXxt.o(.text+0x17c): undefined reference to `screen' /tmp/cc0jkXxt.o(.text+0x182): undefined reference to `clear_to_color' /tmp/cc0jkXxt.o(.text+0x18a): undefined reference to `readkey' Is there something special I should do when using allegro under FreeBSD ? Johan p.s. : I attached the example file to this mail. -- Is er leven zonder Microsoft ? http://www.gewestpallieter.be/~johan/ms-alt/ --TB36FDmn/VVEgNH/ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0422.c" #include <stdio.h> #include <allegro.h> int main(void) { int i; allegro_init(); install_keyboard(); printf("\nThe program will show some dots, then wait a keypress.\n"); printf("After sucesive keypresses the screen will be cleared to different colors\n"); printf("\nPress any key to begin\n\n"); readkey(); if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { printf("%s\n", allegro_error); exit(1); } // Now prepare for some random dots... for (i = 0; i < 64000; i++) { putpixel(screen, rand() % SCREEN_W, rand() % SCREEN_H, rand() % 256); } readkey(); for (i = 0; i < 16; i++) { clear_to_color(screen, i); readkey(); } return 0; } END_OF_MAIN(); --TB36FDmn/VVEgNH/-- >From <all...@ca...> Mon Dec 30 07:16:20 2002 Received: from horkos.telenet-ops.be [195.130.132.45] by canvaslink.com with ESMTP (SMTPD32-6.00) id A91224D1016C; Mon, 30 Dec 2002 07:16:18 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by horkos.telenet-ops.be (Postfix) with SMTP id D28C983FD7 for <al...@ca...>; Mon, 30 Dec 2002 13:13:31 +0100 (CET) Received: from gewestpallieter.be (D5761365.kabel.telenet.be [213.118.19.101]) by horkos.telenet-ops.be (Postfix) with ESMTP id 8A86E83C9B for <al...@ca...>; Mon, 30 Dec 2002 13:13:31 +0100 (CET) Received: by gewestpallieter.be (Postfix, from userid 1001) id AA913B44; Mon, 30 Dec 2002 13:13:31 +0100 (CET) Date: Mon, 30 Dec 2002 13:13:31 +0100 From: Johan Vervloet <jo...@ge...> To: al...@ca... Message-ID: <200...@jo...> Mail-Followup-To: al...@ca... References: <200...@jo...> <200...@jo...> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200...@jo...> User-Agent: Mutt/1.4i X-Editor: Elvis http://elvis.the-little-red-haired-girl.org/ X-Operating-System: FreeBSD/4.7-RELEASE (i386) X-Uptime: 1:12PM up 31 days, 4:56, 10 users, load averages: 0.08, 0.31, 0.26 Subject: Re: [AL] allegro link errors (FreeBSD) Precedence: bulk Sender: all...@ca... Reply-To: al...@ca... X-UIDL: 340680749 Status: O Content-Length: 384 Lines: 12 * Johan Vervloet (jo...@ge...) wrote: > * Johan Vervloet (jo...@ge...) wrote: > > Hello, > > > > I installed allegro on my FreeBSD box, but I don't manage to link compiled executables. > > I think I found the answer on the website (changes since v. 4.0.0) > * Shared libs fixed under FreeBSD. but alas, I still don't manage to link to the library. Johan |