From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: questions about bcd and c++ Organization: Pin Eight Software http://pineight.8m.com/ Message-ID: <8a96hscqfqik9t7n7lgqqindik5ctl59d4@4ax.com> References: <8epjp2$jbp$1 AT nnrp02 DOT primenet DOT com> <8epn4g$k1i$1 AT nnrp02 DOT primenet DOT com> <391063d2 DOT 38568953 AT news DOT freeserve DOT net> <8eprlt$k97$1 AT nnrp03 DOT primenet DOT com> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 27 X-Trace: /K49oBwsuOMuWZiHxpGEP6RFdd4HKDm80993OJFtZ+LDo6GAJ6zVTiPWLba/x+CcUvM5gN7R1up0!fH05JK1l/Q6cVBRgdwOOWoLrb1Sgi9d8fIgPpEywBc8B/3/YWjdaT46C0Yi2oGarODG9/mlB7brp!N4yq2b4= X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Fri, 05 May 2000 19:49:20 GMT Distribution: world Date: Fri, 05 May 2000 19:49:20 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Wed, 3 May 2000 11:37:47 -0700, "Paul Vanukoff" wrote: [snip: bcd library doesn't work with C++ but works with C] [snip: try adding `extern "C"' to all functions] >Thank you so much! That worked like a charm! It's also possible to make one header file that works in both C and C++. Try going into bcd's header file and putting this at the top: #ifdef __cplusplus #define EXTERN_C extern "C" #else #define EXTERN_C #endif Then prefix all function prototypes with EXTERN_C and send the new header file back to the maintainer. -- Damian Yerrick "I refuse to listen to those who refuse to listen to reason." See the whole sig: http://www.rose-hulman.edu/~yerricde/sig.html This is McAfee VirusScan. Add these two lines to your signature to prevent the spread of signature viruses. http://www.mcafee.com/