Hi: I am currently having some problems compiling the C target example based on this famous link: http://www.antlr.org/wiki/display/ANTLR3/Five+minute+introduction+to+ANTLR+3-- which I found very useful. I have some problems however, trying to properly compile this using g++ since the targeted C code will be used for my C++ development.
I basically copied/pasted the code (as verbatim) from that webpage into the Antlrworks 3.2 (just released today). The C runtime library file I used is: libantlr3c-3.2.tar.gz. I followed the instructions listed here ( http://www.antlr.org/api/C/build.html) and did a ./configure --enable-64bit since I am using a 64bit OS. I generated the parser files from the Antlrworks, as expected. I did a compile gcc *.c -lantlr3c -o parser_example which produced no errors. However, as I tried ./parser_example, it gave me the message "error while loading shared libraries: libantlr3c.so: cannot open shared object file: No such file or directory". I was able to locate the libantlr3c.so which was in my /usr/local/lib directory. So I created a symbolic link using sudo ln -s /usr/local/lib libantlr3c.so into my /usr/lib directory. Problem slightly solved but now I have a segmentation fault everytime I run ./parser_example . I did not modify the generated parser files in anyway to cause this problem. So I am not sure why it is accessing the wrong memory address location. So if someone could please help me with this (hopefully simple?) problem, it'll be greatly appreciated. Thanks in advanced, Jay List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
