Mail Archives: djgpp/2001/08/23/01:44:11
> From: <kvogt AT UVic DOT CA>
> Newsgroups: comp.os.msdos.djgpp
> Date: Wed, 22 Aug 2001 21:59:07 -0700
>
> Sample code:
> #include <stdio.h>
> #include <pc.h>
> int main( void )
> {
> ScreenMode(); // declared in pc.h, defined in pc.c
> return 1;
> }
>
> gcc command:
> gcc -o test.exe test.c -lpc
>
> error:
> c:/djgpp/tmp\ccFN3J0x.o(.text+0x78):test.c: undefined reference to
> "ScreenMode"
Something is very wrong with your installation. What version of DJGPP
do you have? The current version is 2.03, and there ScreenMode is
defined on the file scmode.c, not on pc.c, as you say above. (How did
you find out the name of pc.c, anyway?)
> I get the error with other functions within pc.h, and also with other
> functions from other libraries. I checked that libpc.a is in my 'lib'
> directory.
Unless you have a very old v1.x version of DJGPP, libpc.a is an empty
library, kept only for backward compatibility. All the functions that
were in libpc.a are now in libc.a.
What about libc.a--do you have it in your lib subdirectory? What is
its size and time stamp?
> As far as I know, I am using the proper versions for
> everything.
Please post those versions here. In particular, what djdevNNN.zip
file did you install? We need to know the number NNN in that name.
- Raw text -