🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.help
Article #193

Re: funny behaviour with extern "C" (was: Calling C++ from C)

#193
From: tiemann
Date: Tue, 18 Aug 1992 02:38
56 lines
2150 bytes
   Return-Path: help-g++-request@prep.ai.mit.edu
   To: help-g++@prep.ai.mit.edu
   Date: Tue, 18 Aug 1992 17:02:00 GMT
   Organization: European Organization for Nuclear Research, CERN
   From: veitch@vxcrna.cern.ch (Liz Veitch)
   Sender: help-g++-request@prep.ai.mit.edu
   Subject: funny behaviour with extern "C" (was: Calling C++ from C) 
   
   HI,
   
   I have a problem with calling C functions from C++, despite using the 
   recommended syntax. If I have a test C++ program as follows: 
   
   // TEST.CC
   
   extern "C" {
   void foo0();
   void Foo1();
   void FOO2();
   }
   
   
   main ( int argc, char **argv ) {
   
   foo0();
   Foo1();
   FOO2();
   }
   
   
   then I find that the linker correctly starts looking for foo0 in the
   link list, but the functions with capital letters in the name are 
   treated as if I hadn't used extern "C" :
   
   %LINK-W-NUDFSYMS, 3 undefined symbols:
   %LINK-I-UDFSYM,         FOO0
   %LINK-I-UDFSYM,         FOO1_800000X
   %LINK-I-UDFSYM,         FOO2_E00000X
   
   
   Has anyone seen this behaviour/feature/bug before?  And does anyone know 
   how to make it behave properly?
   
   Help!  I'm really stuck, because what I really want to do is add some
   Motif stuff, and who ever heard of a Motif function without capitals in
   the name?  There must be some way to stop this happening. ( I'm using
   GNU 2.2.2 on VAX/VMS. ) 
   
   Thanks in advance,
   Liz Veitch
   
Some enterprising young hacker thought it would be a capital idea to
handle case insensitivity this way.

Michael
Technical Details
Message-ID: <9208181638.AA27116@rtl.cygnus.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!uakari.primate.wisc.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cygnus.com!tiemann
References: <18AUG199218022036@vxcrna.cern.ch>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!uakari.primate.wisc.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cygnus.com!tiemann
From: tiemann@cygnus.com
Newsgroups: gnu.g++.help,comp.lang.c++
Subject: Re: funny behaviour with extern "C" (was: Calling C++ from C)
Message-ID: <9208181638.AA27116@rtl.cygnus.com>
Date: 18 Aug 92 02:38:47 GMT
References: <18AUG199218022036@vxcrna.cern.ch>
Sender: daemon@cis.ohio-state.edu
Organization: Gatewayed from the GNU Project mailing list help-g++@prep.ai.mit.edu
Lines: 56