Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

underscore problem

33 views
Skip to first unread message

Jean-Louis Noel

unread,
Jan 6, 2012, 5:30:30 AM1/6/12
to
Hi,

I have a problem with an underscore.

cl add an underscore at the end and so, link can't find the symbol.
What can I do to fix that problem?

==========
Error! E2028: __imp_Perl_get_context_ is an undefined reference
Error! E2028: __imp_Perl_croak_xs_usage_ is an undefined reference
Error! E2028: __imp_Perl_xs_apiversion_bootcheck_ is an undefined reference
Error! E2028: __imp_Perl_xs_version_bootcheck_ is an undefined reference
Error! E2028: __imp_Perl_newXS_ is an undefined reference
Error! E2028: __imp_Perl_call_list_ is an undefined reference
==========
==========
__imp__Perl_get_context.............................................perl514.dll
__imp__Perl_croak_xs_usage..........................................perl514.dll
__imp__Perl_xs_apiversion_bootcheck.................................perl514.dll
__imp__Perl_xs_version_bootcheck....................................perl514.dll
__imp__Perl_newXS...................................................perl514.dll
__imp__Perl_call_list...............................................perl514.dll
==========

Thank you for your help.

Bye,
Jean-Louis

Paul K. McKneely

unread,
Jan 6, 2012, 8:50:29 AM1/6/12
to
The Open Watcom C compiler has several calling conventions.
Identifiers are often changed to reflect the calling convention used
by adding an underscore either at the beginning or at the end.
You have to choose runtime libraries with the correct calling
convention or the modules will not link. This is intentional because,
if you call a function with the wrong calling convention from your
program, the program will crash because the caller and the callee
aren't doing what each expects of the other. Read about calling
conventions. For example, one convention passes arguments in
registers while another calling convention passes arguments on the
stack.

I use the 386-style argument passing. There are no underscores
added to identifiers. You have to select this option in the IDE
under Compile Options. You then have to put in the correct library
to link to in the Link Options in the IDE. If you are doing compiles
and links at the command line, you need to add the appropriate
command line switches. One way to discover what you need to
do in a command line is the select the options you need in the IDE
and compile a module. You can then grab the command line from
the log window in the IDE. That shows you what the command line
is made of including the switches used. It should be easy.


Kevin G. Rhoads

unread,
Jan 6, 2012, 6:48:24 PM1/6/12
to
>What can I do to fix that problem?

You can override naming defaults using pragmas, you can alias
names with a .DEF file, you can make a do-nothing DLL that
just catches the OW names and calls along to the other names.

Then, there are the exotic possibilities, but I don't think
you want to hear about those.

Jean-Louis Noel

unread,
Jan 8, 2012, 11:11:01 AM1/8/12
to
Hi Paul,

From: "Paul K. McKneely" <pkmck...@sbcglobal.net>

> I use the 386-style argument passing. There are no underscores

Thank you, I will check.

Bye,
Jean-Louis

0 new messages