[antlr-interest] Re: Using Antlr in Solaris with CC

cela_vei cela_vei at yahoo.com
Tue Nov 5 09:13:10 PST 2002


I am using Antlr 2.7.2.a2. 
Solaris 5.8
Sun WorkShop 6 update 2 C++ 5.3 Patch 111685-06 2002/03/09

The problems I faced where 
1. it was using g++
2. make install would not work 
3. I could not link the objects in examples/cpp/calc.

I finally managed to do everything going through these steps.

1. export CC=cc
2. export CXX=CC
3. ./configure -prefix=$HOME/antlr-2.7.2a2
4. mkalljar
5. cd lib/cpp/src
6. gmake
This generates libantr.a but it does not link correctly.
Create libantlr.a again with the command
CC -xar -o libantr.a ANTLRException.o ...... TreeParser.o

7. cp $HOME/antlr-2.7.2.a2/scripts/install-sh $HOME/antlr-
2.7.2.a2/lib/cpp/scripts

8. cd $HOME/antlr-2.7.2.a2
8. gmake install

The major step is  when you manually make the libantlr.a. 
Specifying RANLIB=-xar does not help. Anyway that was the biggest
clue I need from one of your earliar posts.

If I use g++, gcc I didn't have to go through the special way of
making libantlr.a

Cela

--- In antlr-interest at y..., Ric Klaren <klaren at c...> wrote:
> Hi,
> 
> On Mon, Nov 04, 2002 at 09:36:51PM -0000, cela_vei wrote:
> > I have lot of problems getting to use Antlr on Solaris.
> > 
> > Does anyone have instructions how to compile the Antlr and get 
> > libantlr.a and be able to compile the calc binary in the 
> > examples/cpp/calc directory?
> > 
> > I am using Solaris and CC compiler.
> 
> Which version of antlr? Which version of CC (CC -V tells this) ? 
What goes
> wrong? Did you read lib/cpp/README it has some tips on different 
compilers.
> 
> Cheers,
> 
> Ric
> -- 
> -----
+++++*****************************************************+++++++++---
----
>     ---- Ric Klaren ----- klaren at c... ----- +31 53 4893722  ----
> -----
+++++*****************************************************+++++++++---
----
>   "I don't have anything against Java - it's the best damn 
implementation
>               of UCSD Pascal ever released..." --- Larry Smith


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list