Try adding this to your grammar:
@header {
#ifndef _YourFile_H
#include <your_includes>
using namespace std;
#endif
}
where you replace YourFile and your_includes appropriately.
I think that you want to be able to include your stl related stuff
in your .c file, but not in your header file, and the above should
work.
-Robert
On Fri, Feb 13, 2009 at 3:52 AM, Carter Cheng <[email protected]> wrote:
>
> Hi,
>
> I have been playing around with intermingling the C runtime with some C++ STL
> constructs (admittedly not exception safe) and noticed I that I get what I
> believe are linker errors doing to interactions between the extern "C" { ...
> } declaration which shows up in the header file and stl includes such as
> #include <list> etc.
>
> Is there a way workaround this issue (ignoring for the moment the issue of
> STL containers throwing exceptions in C code which are uncaught).
>
> Thanks in advance,
>
> Carter
>
>
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
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
-~----------~----~----~----~------~----~------~--~---