Mail Archives: djgpp/1999/09/21/20:37:55
On Mon, 20 Sep 1999, Ghalos wrote:
> _go32_dpmi_get_protected_mode_interrupt_handler(0x09, &original_vector);
>
> handler_info.pm_offset = keyboard_handler; // <-- Causes a warning!
> _go32_dpmi_allocate_iret_wrapper(&handler_info);
> _go32_dpmi_set_protected_mode_interrupt_handler(0x09, &handler_info);
> // End code fragment
>
> When I compile (include dpmi.h and go32.h) it will compile fine but when it
> links I get:
>
> Error: undefined reference to
> '_go32_dpmi_get_protected_mode_interrupt_vector'
> Error: undefined reference to
> '_go32_dpmi_set_protected_mode_interrupt_vector'
I'm confused. The code calls _go32_dpmi_set_protected_mode_interrupt_handler,
but the error message is about _go32_dpmi_set_protected_mode_interrupt_vector?
Did you copy the error message and the code by hand? If so, which one is
right?
The DJGPP library has _go32_dpmi_set_protected_mode_interrupt_vector, not
_go32_dpmi_set_protected_mode_interrupt_handler.
> Error: undefined reference to 'LOCK_VARIABLE'
> Error: undefined reference to 'LOCK_FUNCTION'
Obviously, you didn't define 'LOCK_FUNCTION' and 'LOCK_VARIABLE'.
> however the linker does not complain about the free /
> allocate_iret_wrapper...
Because the library has it. Please check the library reference (the
file libc.info) for correct spelling of function names.
- Raw text -