Here is the working recipe, repeated until it works exactly from a clean install every time with no redo Environment: Windows 2000: cygwin: 1.5.5.1 Êwhich has problems with gcc and cpp (and configure fails with) mingw : MinGW-3.1.0-1.exe (do not forget to rename make.exe to mingw32-make.exe, as it cannot cope with the ANTLR Makefile!, but the cygwin one can) path in cygwin to use mingw first PATH="/mingw/bin:/usr/local/bin:/usr/bin:/bin:$PATH" java SDK: j2sdk-1_4_2-nb-3_5_1-bin-windows.exe antlr: antlr-2.7.2.tar.gz 1.Untar anltr into a new directory under cygwin {mine is C:\cygwin\redo\antlr-2.7.2, under cycgwin its /redo/antlr-2.7.2} Do NOT add antlr.jarÊ to your $CLASSPATH environment, as it is not a valid file yet. 2. Note that /configure contains an error at # Java CLASSPATH=$CLASSPATH:. Êjust comment it out, as we set the . in the external CLASSPATH #CLASSPATH=$CLASSPATH:. 3. set up class path for configure Ênote the . in the path ÊÊÊÊÊÊÊ the ; path seperator ÊÊÊÊÊÊÊ the windows file format. ÊÊÊÊÊ These are because Java j2sdk is a windows application, not a cygwin application export CLASSPATH=".;c:\cygwin\j2sdk1.4.2\lib" $ echo $CLASSPATH .;c:\cygwin\j2sdk1.4.2\lib 3. cd ÊÊ run configure as ./configure --prefix= with base dir in windows format $ ./configure --prefix=/redo/antlr-2.7.2 ... configure: creating ./config.stat cconfigure: creating ./config.status config.status: creating scripts/Config.make config.status: creating scripts/antlr-config config.status: creating scripts/run-antlr $ 4. cd scripts & edit the Config.make just created to put the correct class path in # Programs we might use and their options... # next line commented #ANTLRÊÊÊ = $(JAVA) -cp $(TOPDIR)/antlrall.jar antlr.Tool ANTLRÊÊÊ = $(JAVA) -cp "C:\cygwin\redo\antlr-2.7.2" antlr.Tool 5. clear $CLASSPATH (not set it to blank, that does NOT work) unset CLASSPATH 6. build with NO Classpath make $ make ============================= Making dependencies... ============================= make[1]: Entering directory `/redo/antlr-2.7.2/antlr' ... =========================================== Making antlr.jar... =========================================== =========================================== Making antlr.debug.jar... =========================================== Building antlr/ANTLRTokdefLexer.java Building antlr/ANTLRTokdefParser.java Note: antlr/ANTLRTokdefParser.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. Building antlr/actions/cpp/ActionLexer.java Building antlr/actions/java/ActionLexer.java Building antlr/preprocessor/Preprocessor.java Note: antlr/preprocessor/Preprocessor.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. Building antlr/preprocessor/PreprocessorLexer.java =========================================== Making antlrall.jar... =========================================== 7. Make install with NO Classpath make install $ make install Installing jar files into /redo/antlr-2.7.2/share/antlr-2.7.2 ... Installing config.hpp into /redo/antlr-2.7.2/include/antlr make[3]: Leaving directory `/redo/antlr-2.7.2/lib/cpp/antlr' make[2]: Leaving directory `/redo/antlr-2.7.2/lib/cpp' make[1]: Leaving directory `/redo/antlr-2.7.2/lib' 8. check in antlr-2.7.2/lib for libantlr.a 9. set up class path to run $ export CLASSPATH=".;c\cygwin\j2sdk1.4.2\lib;C:\cygwin\redo\antlr- 2.7.2\antlrall.jar" 10. create test directory $ mkdir grammars $ cp examples/cpp/*/*.g grammars $ cd grammars 11. test $antlr calc.g Check for the hpp & cpp files in grammars