Xref: news2.mv.net comp.os.msdos.djgpp:4451 From: Tom Wheeley Newsgroups: comp.os.msdos.djgpp Subject: Re: conio.h and -lpc problem Date: Sat, 01 Jun 96 00:07:13 GMT Organization: City Zen FM Lines: 25 Message-ID: <833587633snz@tsys.demon.co.uk> References: <31A4878E DOT 4C5F AT xensei DOT com> Reply-To: tomw AT tsys DOT demon DOT co DOT uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In article pjbk AT cee DOT hw DOT ac DOT uk "Peter JB King" writes: > In article <31A4878E DOT 4C5F AT xensei DOT com> Joe Johnston writes:> >Hi, > > I'm trying to get conio.h functions to work. Before you mention that > >this same question ask been asked and answeres 2^16 times, I know that I > >ought to compile with the -lpc argument. Even with this, I'm getting the > > D:\DJGPP\PROJ>gcc -lpc clr.c -o clr > > clr.c(.text+0x14): undefined reference to `getch' > > clr.c(.text+0x22): undefined reference to `putch' > The problem is the ordre of the arguments to gcc. It searches the > library when it has no object file to search for unresolved refeerences. > Try this instead > > D:\DJGPP\PROJ>gcc clr.c -o clr -lpc Strangely, though, I compiled the exact same program as detailed earlier and it ran perfectly, even if I omitted the -lpc. Maybe I am redefining perfectly, but it seemed to work ok when I tried it... ..splitbung, with a clean install of v2. -- * TQ 1.0 * The 'Just So Quotes'. "I think you should defend to the death their right to march, and then go down and meet them with baseball bats." -- Woody Allen, on the KKK