* 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.
On Fri, 28 Nov 2008, Samuel Tardieu wrote:
> I wrote "this C++ code". It means that you must compile it with g++ (otherwise
> it is valid C code), as well as link it with g++ (without deriving too much,
> let me just say that g++ called in link mode does a bit more than linking --
> it takes car
> 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. Fortunately, all your system headers already provide you with
> 'extern "C"'
> "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
On Fri, 28 Nov 2008, sgaurelius wrote:
> Finally, it was somthing really easy and stupid and had nothing to dowith
> bison. I just was worred, because I don't know how much compatible C and C++
> code can be.
A linker should be able to link object files no matter what language was
used to pro
al you can find here
> http://www.gnu.org/software/bison/manual/html_mono/bison.html
> ___
> help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison
>
>
--
View this message in context:
http://www.nabble.com/Bison-complains-
On 23 Nov 2008, at 17:48, sgaurelius wrote:
I am a newbie in bison, so I don't know all the secrets. I used for
a while a
standard example with its own data type and now I want to include
my own. I
included the header file, but the compiler throws me an exception for
undefined reference. How
is
--
View this message in context:
http://www.nabble.com/Bison-complains-about-undefined-reference-of-my-own-data-type-tp20648086p20648086.html
Sent from the Gnu - Bison - Help mailing list archive at Nabble.com.
___
help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison
2008/11/24 sgaurelius <[EMAIL PROTECTED]>
>
>
> Do you have any guide, on how to include a library to bison. I will search
> it by myseld, but if you got somehting, it'd be useful.
>
>
Maybe it would be worth to check also guides on your linker and compiler.
Official bison manual you can find here
___
>> help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison
>>
> ___
> help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison
>
>
--
View this message in c
What exactly say the compiler?
If you get some undefined reference message on stage of compilation of bison
output, then you must check if all needed definitions really included.
If you get undefined reference message on linking stage, the solution
usually is to add object file with implementation
Hi!
I am a newbie in bison, so I don't know all the secrets. I used for a
while a standard example with its own data type and now I want to
include my own. I included the header file, but the compiler throws me
an exception for undefined reference. However, this is not true, the
implementatio
13 matches
Mail list logo