Mail Archives: djgpp/2001/08/23/03:30:14
Thanks for replying so quickly. I must have assumed that ScreenMode() is
defined in "pc.c", but that was wrong. I realize now that I don't have
that file (in fact, I don't have scmode.c either).
I actually don't care about that specific function.
I am trying to use
a program called PCTimer, which uses the following functions that my
linker has trouble with. Some of these are declared in pc.h; I should have
used one of them, rather than ScreenMode(), in my example.
__dpmi_simulate_real_mode_interrupt
__dpmi_simulate_real_mode_procedure_iret
_go32_dpmi_allocate_real_mode_callback_iret
_go32_dpmi_chain_protected_mode_interrupt_vector
_go32_dpmi_free_real_mode_callback
_go32_dpmi_get_protected_mode_interrupt_vector
_go32_dpmi_get_real_mode_interrupt_vector
_go32_dpmi_lock_code
_go32_dpmi_lock_data
_go32_dpmi_set_real_mode_interrupt_vector
_go32_my_cs
biostime
disable
disable
enable
getch
inportb
outportb
PCTimer consists mainly of 'gccint8.h' and 'gccint8.c'. If you are
interested, I posted those files at
"http://www.csc.uvic.ca/~kvogt/pctimer/".
I also posted my verbose gcc output at the same location. I named it
'gcc.txt'.
I just installed DJGPP today, using the following zip files:
alleg312.zip
bnu2112b.zip
djdev203.zip
em2005b.zip
em2005li.zip
faq230b.zip
fil40s.zip
gcc2953b.zip
gpp2953b.zip
grx243s.zip
mak3791b.zip
rh1478b.zip
rsxdj151.zip
txi40b.zip
Now I'm wondering if I have the files necessary to run gccint8.c. For
example, given the above zip files, the function outportb() (declared in
pc.h) is defined in a number of .c files. All but one of those .c files
are below djgpp/allegro/. The remaining .c file that defines outportb() is
C:\DJGPP\contrib\grx243\src\bgi\rgbpal_g.c. Is that what I should be
using? If so, how do I tell the linker?
Kevin
On Thu, 23 Aug 2001, Eli Zaretskii wrote:
> > 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 -