Mail Archives: djgpp/1997/12/11/19:45:55
Thomas Larsson wrote:
>
> Thanks for your help, I have looked through the FAQ but I can't find any
> answers to the problems there...
Chapter 8.7 discusses your exact problem. It is titled "Unresolved
externals when linking programs." This would seem to be a dead giveaway
that it can help you solve your problem. :-)
C++ uses a different set of libraries than C. The compiler does not
automatically link these libraries, so you have to specify them
yourself. There are two ways to do so: add "-lgpp" to the end of your
command line, or use 'gxx' instead of 'gcc' when compiling C++ programs.
> I have also tried to compile some examples for multiple keypresses. They
> all include a keyword called "interrupt" but DJGPP doesn't find it
> anywhere. Should I replace it or should I use another keyword?
The FAQ also discusses these issues in chapter 18. The "interrupt"
keyword is unknown to gcc, and in any case, interrupt handling is
substantially different under protected mode than under real mode. Your
old code probably wouldn't work anyway even if you did manage to get gcc
to recognize that keyword. Please read through chapter 18, and then
look through some example DJGPP code that uses interrupt handling, such
as the Allegro library or the 'v2tk/mkkbd3.zip' sample program.
hth
--
---------------------------------------------------------------------
| John M. Aldrich | "Money is truthful. If a man speaks |
| aka Fighteer I | of his honor, make him pay cash." |
| mailto:fighteer AT cs DOT com | |
| http://www.cs.com/fighteer | - Lazarus Long |
---------------------------------------------------------------------
- Raw text -