From: Caroline Langensiepen Newsgroups: comp.os.msdos.djgpp Subject: Re: Changing from C to C++ Date: Thu, 11 Dec 1997 10:03:07 +0000 Organization: timehigh Distribution: world Message-ID: <+0mHrBAbp7j0Ewlq@timehigh.demon.co.uk> References: <2mgLUAAHZHj0Ewld AT timehigh DOT demon DOT co DOT uk> <348c947f DOT 5283597 AT news DOT uni-duisburg DOT de> NNTP-Posting-Host: timehigh.demon.co.uk MIME-Version: 1.0 Lines: 27 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk > >To resolve these problems, surround your C headers with > >#ifdef __cplusplus >extern "C" { >#endif > >[your prototypes go here] > >#ifdef __cplusplus >} >#endif > >This makes that the compiler tell the linker that it has to search for a >_SVAsyncProtISR, not a _SVAsyncProtISR__Fi or whatever. > > Thanks to all who sent in the above (which of course worked) and kindly didn't comment on what a dimboid I was being. When I used to link Ada to C routines, I had to specify pragma 'c', so I should have realised I had to tell gcc something similar. What lulled me into a false sense of security was that a couple of years ago, I wrote a lot of Visual C++ which used a c library (which I had modified & converted to a dll), and never had to tell it about the C - and it seemed to work ok. Thanks again -- Caroline Langensiepen