help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: %union with STL


From: Hans Aberg
Subject: Re: %union with STL
Date: Fri, 29 May 2009 10:50:28 +0200

On 27 May 2009, at 23:45, Hans Aberg wrote:

On 27 May 2009, at 20:52, Akim Demaille wrote:

You will be able to do that in Bison 2.6.  A preview is available at

http://www.lrde.epita.fr/~akim/download/bison-2.4.266-4ff3b.tar.bz2

Using that version, you can use actual objects (not pointers to), as in the attached sample file.
...
<variant.yy>

Looks nice, but I got linker errors - a header missing somewhere :-). I used
 bison variant.yy
 gcc variant.tab.cc -o variant > error.txt 2>&1

I found out this problem: one must use g++ instead of gcc, or adding - lstdc++, as in:
  g++ variant.tab.cc -o variant
  gcc variant.tab.cc -lstdc++ -o variant
For some reason, 'gcc', though it can compile C++ code, does not include this standard C++ library.

  Hans






reply via email to

[Prev in Thread] Current Thread [Next in Thread]