gcc,cc application linkage q's

From: kirk m anderson <kma_at_icf.hrb.com>
Date: 22 Mar 93 14:24:21 EST
Message-ID: <1993Mar22.142421.20110_at_icf.hrb.com>


Recently, a colleague on my project extracted a news article posted here addressing a subject of great interest -- certain Oracle linkage quirks. We have been able to make a few discoveries in this area. We would like to submit them to you for feedback based upon your experience, or pointers to other information sources.

Specifically, we are trying to compile and link some ORACLE applications and are having a few problems. Perhaps you could help.

Our envirnment consists of gcc (ansi) for compilation and [Sun] cc (/usr/5bin/cc) for linkage.

The compiles work fine as long as the pre-compiler 'code' flag set to 'kr_c' and the 'mode' flag is sett to 'ansi'.

Our first links gave us '___main' as an undefined. After some trial and error, we found that we had to create a dummy procedure called '__main' in order for the link to proceed error-free. Tests showed that '__main' procedure got executed before the 'main' procedure.

Do you have any clues as to where the '__main' came from? Is it advisable to proceed with this method, or is there another, perhaps better, way around the problem?

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

        Kirk M. Anderson kma_at_icf.hrb.com HRB Systems, Inc. Received on Mon Mar 22 1993 - 20:24:21 CET

Original text of this message