Mail Archives: djgpp/1994/05/26/11:24:54
Hi,
I posted this to comp.os.msdos.programmer, but someone recommended I
try here instead...
A colleage can't get clrscr() to work as expected... the following draws
only a brown line down column 2 of either the screen or the window, if one
is explicitly defined.
#include <conio.h>
main()
{
textbackground(BROWN);
textcolor(YELLOW);
/* window(5,5,10,10); /* */
clrscr();
}
tried downloading the source for the library... looks okay to my untrained
eye - except textmode() is defined as a null function ????
part II
when I tried to explicitly compile-in gppconio.c and screen.s with
test.c above, I get unresolved symbols getch and dosmemsetup
gppconio.c(.text+521): undefined reference to `getch'
...
fake(.text+52): undefined reference to `dosmemsetup'
...
- BTW - what is fake - some sort of internal table in linker ?
now from what I can tell, both looking at the source and ar-ing the
libraries, dosmemsetup is in libc, which 'gcc -v' shows that it is
being scanned...hang on...yes, if I add a call to printf, that is
resolved [at least no errors...]
the symbols are resolved if I link test.o with -lpc, yet these
symbols aren't in libpc.a ... are they ..?
What feature of the linker am I missing here..?
[aside - just got a link error/warning 'repeated symbol start'
I notice that crt0.s defines a fn start... shouldn't that be
at least __start or something..???
]
I cant believe it's the library, as someone must have noticed by now..?
It's not anything like different calling conventions between c and c++,
or anything like that..? [NAH - couldn't be...]
thanks in advance, and apologies if this is not the right place for this...
dd
--
David Denholm 'official' : D DOT R DOT Denholm AT southampton DOT ac DOT uk
Physics dept. preferred : denholm AT sotona DOT physics DOT southampton DOT ac DOT uk
Southampton University Tel : (0703) 592104 (work) (0489) 576733 (home)
Southampton SO9 5NH Fax : (0703) 585813
- Raw text -