home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!agate!plutonium.CChem.Berkeley.EDU!matte
- From: matte@plutonium.CChem.Berkeley.EDU (Matt Rose)
- Newsgroups: comp.lang.pascal
- Subject: Re: Linking C++ .OBJ's with TP 5.5
- Date: 24 Dec 1992 04:59:28 GMT
- Organization: University of California, Berkeley
- Lines: 28
- Message-ID: <1hbg3gINNngk@agate.berkeley.edu>
- References: <BzosFE.KA6@eis.calstate.edu>
- NNTP-Posting-Host: plutonium.cchem.berkeley.edu
-
- In article <BzosFE.KA6@eis.calstate.edu> mparanj@eis.calstate.edu (Milind Paranjpe) writes:
- >Hello:
- >
- >I'm trying to link in functions written in Borland C++ 2.0 into a Pascal
- >program (TP 5.5). I keep getting errors saying that the public symbols in
- >the C++ .OBJ file aren't in the CODE segment. Looking at the C++ manual, all
- >the code goes in a segment called _TEXT. Is there a way to change this so
- >TP 5.5 can recognize and use the C++ function??
- >
- >Thanks,
-
- I'm almost certain that your problem is due to name mangling. Something
- C++ does to allow overiding functions.
- int funcName(int, int);
- would look like funcName_int_int
- or some ridiculous thing like that.
- Anyway, the point is that if you can disable name mangling, there's a
- good chance this will fix your problem. Unfortunately I can't remember
- the keyword, and I have the code at home, and I'm leaving tomorow.
- But if you can find the word, then the declaration in the C++ code would
- look like this:
-
- int far pascal _export secretWord funcName(paramList);
-
- Now, does anyone out there know the secret word?
-
- Good luck
- -matt
-