Thread View: comp.os.ms-windows.programmer.tools
2 messages
2 total messages
Started by Brian S. McCarthy
Wed, 18 Nov 1992 14:51
Exporting functions from Borland C++
Author: Brian S. McCarthy
Date: Wed, 18 Nov 1992 14:51
Date: Wed, 18 Nov 1992 14:51
11 lines
1004 bytes
1004 bytes
I've written a DOS application in Borland C++, which I now want to turn into a DLL to link with a Visual Basic front end. How can I get Borland C++ to "export" a function from a C++ program? It's no problem as long as I stick with C, but from C++ it won't export. Brian McCarthy United Technologies Research Center East Hartford, Connecticut(203)727-7638 bsm@utrc.utc.com
Re: Exporting functions from Borland C++
Author: John Grant
Date: Wed, 18 Nov 1992 17:34
Date: Wed, 18 Nov 1992 17:34
17 lines
1136 bytes
1136 bytes
In article <bsm.1.0@res.utc.com> bsm@res.utc.com (Brian S. McCarthy) writes: > >I've written a DOS application in Borland C++, which I now want to turn into >a DLL to link with a Visual Basic front end. > >How can I get Borland C++ to "export" a function from a C++ program? It's >no problem as long as I stick with C, but from C++ it won't export. C++ mangles the names, whereas C doesn't. See page 31-32 of Borland's "Programmer's Guide (3.1)" (blue/yellow/white book). Declare your function prototype as follows: extern "C" ... myfunc(...); This tells C++ not to mangle any references to this function. -- John A. Grant jagrant@emr1.emr.ca Airborne Geophysics Geological Survey of Canada, Ottawa
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads