🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Liz Veitch Tue, 18 Aug 1992 17:02
funny behaviour with extern "C" (was: Calling C++ from C)
#192
Author: Liz Veitch
Date: Tue, 18 Aug 1992 17:02
44 lines
1478 bytes

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
Re: funny behaviour with extern "C" (was: Calling C++ from C)
#193
Author: 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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads