Date: Thu, 23 Aug 2001 08:41:03 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: kvogt AT UVic DOT CA Message-Id: <3405-Thu23Aug2001084102+0300-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9 CC: djgpp AT delorie DOT com In-reply-to: (kvogt AT UVic DOT CA) Subject: Re: gcc 'undefined reference' error References: Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: > Newsgroups: comp.os.msdos.djgpp > Date: Wed, 22 Aug 2001 21:59:07 -0700 > > Sample code: > #include > #include > 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.