🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.tools
Article #751

Re: Exporting functions from Borland C++

#751
From: John Grant
Date: Wed, 18 Nov 1992 17:34
17 lines
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
Technical Details
Message-ID: <1992Nov18.173447.721@emr1.emr.ca>
Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!skule.ecf!torn!nott!emr1!jagrant
References: <bsm.1.0@res.utc.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.tools
Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!skule.ecf!torn!nott!emr1!jagrant
From: jagrant@emr1.emr.ca (John Grant)
Subject: Re: Exporting functions from Borland C++
Message-ID: <1992Nov18.173447.721@emr1.emr.ca>
Keywords: export
Organization: Energy, Mines, and Resources, Ottawa
References: <bsm.1.0@res.utc.com>
Date: Wed, 18 Nov 1992 17:34:47 GMT
Lines: 17