[antlr-interest] C++ compile issue with ANTLR 3.1.0b1 C runtime files

Chris Snyder snyder at t-vec.com
Thu Mar 13 11:37:29 PDT 2008


Hello Jim,

 

Winsock2.h also works.

 

Another minor thing. I get this warning:

 

libantlr3c-3.1.0b1\include\antlr3defs.h(75) : warning C4005:
'_CRT_SECURE_NO_DEPRECATE' : macro redefinition

 

could you wrap the #define in a #ifndef so there is no conflict with other
applications defining that macro.

 

Thanks,

Chris

 

  _____  

From: Jim Idle [mailto:jimi at temporal-wave.com] 
Sent: Thursday, March 13, 2008 1:51 PM
To: snyder at t-vec.com; antlr-interest at antlr.org
Subject: RE: [antlr-interest] C++ compile issue with ANTLR 3.1.0b1 C runtime
files

 

Also,

 

Try #include "Winsock_2.h" as well, though you should not really need to
include this I think. Perhaps there is some configuration you can end up
with whereby you do need this. If that works for you, I will add it to the
include files perhaps.

 

Jim

 

From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Chris Snyder
Sent: Thursday, March 13, 2008 10:13 AM
To: antlr-interest at antlr.org
Subject: [antlr-interest] C++ compile issue with ANTLR 3.1.0b1 C runtime
files

 

I'm trying to compile my C output in CPP and I get this error

 

libantlr3c-3.1.0b1\include\antlr3debugeventlistener.h(42) : error C2146:
syntax error : missing ';' before identifier 'socket'

 

which corresponds to this:

 

antlr3debugeventlistener.h

/// The socket structure we receive after a successful accept on the
serverSocket

///

SOCKET                        socket;

 

I looked for the SOCKET definition and didn't find one being used in my
configuration. I did find a UNIX definition in antlr3defs.h:

 

// SOCKET not defined on Unix

// 

typedef     int                     SOCKET;

 

but it is not even reached because preprocessor ANTLR3_WINDOWS is defined 

 

Should I be including a windows socket header?

 

I'm in windows XP using VS2005 and VC++ 2005.

 

Thanks,

Chris

 

 

T-VEC Technologies, Inc.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080313/a1ab11ab/attachment.html 


More information about the antlr-interest mailing list