Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornellcs!newsfeed.cit.cornell.edu!newsstand.cit.cornell.edu!news.kei.com!newsfeed.internetmci.com!in2.uu.net!ncrgw2.ncr.com!ncrhub6!daynews!ranger!news
From: wesley.hunter@AtlantaGA.ATTGIS.com
Subject: Re: C++ VS SMALLTALK
X-Nntp-Posting-Host: 192.127.2.29
Message-ID: <DHs5K5.F9C@ranger.daytonoh.attgis.com>
Sender: news@ranger.daytonoh.attgis.com (News Administrative Login)
Organization: AT&T Human Interface Technology Center
X-Newsreader: <WinQVT/Net v3.9>
Date: Thu, 9 Nov 1995 14:28:53 GMT
Lines: 33

In article <47qbqm$4pr@bcarh8ab.bnr.ca> CK Wong <ci784@freenet.carleton.ca> writes:
>Stephan Meyn <s.meyn@oose.com.au> wrote:
>>I would like to add a 
>>third option:
>>consider to do the processing intensive bits in C++ and the rest 
>>in Smalltalk. Pack up the C++ stuff in DLL's and call it from 
>>Smalltalk. This is not as hard as it appears and you can reap 
>>both benefits at the same time.
>>
>My work requires to integrate some C++ code into ParcPlace Smalltalk
>environment.
>The difficulty involved is :
>
>C++ hashes the function name so that it can support different messages with the
>same method name.
>But Smalltalk uses the C function name. Could you enlight me how to resolve the
>problem.
>


I've done this a few times and it's not pretty.  You need to define all your DLL
entry points as normal C functions inside an 

	extern "C" {
	}

section.  If you do this you don't seem to have to name mangling problem.  The only
other solution (ugly) I know is to use some library parsing tool that can extract
and display the mangled names of the functions.

wesh

Wesley.Hunter@AtlantaGA.ATTGIS.com
