Hello I am back trying my hand at Pascal again after a couple of years absence...and am relatively new to Linux so please bear with me.
Just installed GPC with the built-in 3.3.3 GCC...but I can't compile any of the units in the units directory. I am using the commandline "gpc --automake crt.pas" I keep getting errors like this:
/usr/lib/crt1.o: In function `_start': (.text+0x18): undefined reference to `main' /tmp/ccOU5D50.o: In function `Textmode': crt.pas:(.text+0x125): undefined reference to `crt_Check_WinChanged' crt.pas:(.text+0x1a3): undefined reference to `crt_SetMonochrome' crt.pas:(.text+0x1b5): undefined reference to `crt_SetScreenSize' crt.pas:(.text+0x1e0): undefined reference to `crt_Window' crt.pas:(.text+0x1e5): undefined reference to `crt_ClrScr' /tmp/ccOU5D50.o: In function `crt_GetScreenSize': crt.pas:(.text+0x201): undefined reference to `crt_Check_WinChanged'
//snip//
What am I doing wrong ???
Thanks
Cheers
Frank in Montreal
Frank McCormick wrote:
I am back trying my hand at Pascal again after a couple of years absence...and am relatively new to Linux so please bear with me.
Just installed GPC with the built-in 3.3.3 GCC...but I can't compile any of the units in the units directory. I am using the commandline "gpc --automake crt.pas" I keep getting errors like this:
/usr/lib/crt1.o: In function `_start': (.text+0x18): undefined reference to `main' /tmp/ccOU5D50.o: In function `Textmode': crt.pas:(.text+0x125): undefined reference to `crt_Check_WinChanged' crt.pas:(.text+0x1a3): undefined reference to `crt_SetMonochrome' crt.pas:(.text+0x1b5): undefined reference to `crt_SetScreenSize' crt.pas:(.text+0x1e0): undefined reference to `crt_Window' crt.pas:(.text+0x1e5): undefined reference to `crt_ClrScr' /tmp/ccOU5D50.o: In function `crt_GetScreenSize': crt.pas:(.text+0x201): undefined reference to `crt_Check_WinChanged'
//snip//
What am I doing wrong ???
To compile a unit (such as CRT), use "-c" on the command-line.
However, when using automake (or the GP utility), you don't usually have to compile units explicitly at all. Just compile your main program (which uses CRT, directly or via another unit), and GPC should compile and link all that's needed.
Frank
On Sun, 29 Oct 2006 21:43:04 +0100 Frank Heckenbach ih8mj@fjf.gnu.de wrote:
Frank McCormick wrote:
crt.pas:(.text+0x1e0): undefined reference to `crt_Window' crt.pas:(.text+0x1e5): undefined reference to `crt_ClrScr' /tmp/ccOU5D50.o: In function `crt_GetScreenSize': crt.pas:(.text+0x201): undefined reference to `crt_Check_WinChanged'
//snip//
What am I doing wrong ???
To compile a unit (such as CRT), use "-c" on the command-line.
However, when using automake (or the GP utility), you don't usually have to compile units explicitly at all. Just compile your main program (which uses CRT, directly or via another unit), and GPC should compile and link all that's needed.
That fixed it - wonderful ! And your GP utility is great this is starting to be fun again! Thanks for the advice.
Cheers
Frank in Montreal