[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
About C++ bison example
From: |
mainty |
Subject: |
About C++ bison example |
Date: |
Tue, 30 Oct 2007 19:12:00 +0100 (CET) |
User-agent: |
SquirrelMail/1.4.10a |
Dear Mr. Paul Eggert,
I would like to ask a few questions related to the calc++ example in the
bison -2.3 distribution.
Could you please explain how to compile the example using command lines
instead of the provided Makefile? I tried the following command sequences
and I didn't manage. I got some errors during the linking process:
$ bison -d -ra -S lalr1.cc -ocalc++-parser.cc calc++-parser.yy
$ g++ -c calc++-parser.cc
$ flex -ocalc++-scanner.cc calc++-scanner.ll
$ g++ -c calc++-scanner.cc
$ g++ -c calc++.cc
$ g++ -c calc++-driver.cc
$ g++ -o calc++ calc++.o calc++-parser.o calc++-scanner.o calc++-driver.o
And the error I got was:
calc++-parser.o: In function `std::_Deque_iterator<yy::location,
yy::location&, yy::location*>::operator-(int) const':
calc++-parser.cc:(.text._ZNKSt15_Deque_iteratorIN2yy8locationERS1_PS1_EmiEi[std::_Deque_iterator<yy::location,
yy::location&, yy::location*>::operator-(int) const]+0x39): undefined
reference to `_ZNSt15_Deque_iteratorIN2yy8lïcationERS1_PS1_EC1ERKS4_'
collect2: ld returned 1 exit status
Thank you in advance for your help,
Manitra
- About C++ bison example,
mainty <=