* Laurence Finston <[EMAIL PROTECTED]> [2008-11-28 17:10:27 +0100]
| I'm sorry if I'm being obtuse. What are you doing differently and what
| error message is one supposed to get?
With extern "C":
% g++ -o t t.cc
[nothing printed, no error]
Without extern "C":
% g++ -o t t.cc
/tmp/ccMxFapw.o
* Laurence Finston <[EMAIL PROTECTED]> [2008-11-28 15:48:02 +0100]
| > You need to do it to interface to any library written in C (such as
| > the standard C library for example). For example, try the following
| > C++ code with and without 'extern "C"'. Without it, you won't be able
| > to link.
> "Laurence" == Laurence Finston <[EMAIL PROTECTED]> writes:
Laurence> One thing you might have to look out for is "name-mangling"
Laurence> which C++ compilers do. You might have to turn it off for C
Laurence> code by specifying C-linkage, e.g., "extern "C" foo(void);".
Laurence> I've never
f the neatest *->git
conversion I've ever seen on such a project.
Sam
--
Samuel Tardieu -- [EMAIL PROTECTED] -- http://www.rfc1149.net/
___
help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison