Unresolved ENTGQQ Is Mixed-Language Calling Convention Problem

ID Number: Q51487

4.00 | 4.00

MS-DOS | OS/2

Summary:

If the linker returns an "Unresolved External" error for the label

"ENTGQQ" when doing C and Pascal mixed-language programming, then the

cause is most likely the use of the wrong calling convention on the C

main() function.

ENTGQQ is the program entry point for an executable Pascal program. If

your main program is in C and you are generating Pascal calling

conventions with the /Gc compiler option, then you must explicitly

declare your main() function with the "cdecl" keyword. Failure to do

this results in an attempt to resolve the C main() start-up calls in

the Pascal rather than the C libraries, resulting in the unresolved

entry point ENTGQQ.