Building with Visual 2005 fails

View: New views
2 Messages — Rating Filter:   Alert me  

Building with Visual 2005 fails

by resul sahin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

When I build the log4cxx on Visual 2005 according to instructionshttp://logging.apache.org/log4cxx/building/vstudio.html, I am getting error below;

 1>------ Build started: Project: apr, ConfigurationDebug Win32 ------

1>Compiling...
1>userinfo.c
1>c:\program files\microsoft visual studio 8\vc\platformsdk\include\rpcndr.h(145) :   error C2059: syntax error : ':'
1>c:\program files\microsoft visual studio 8\vc\platformsdk\include\rpcndr.h(898) : error C2059: syntax error : ','
.
.
.
1>c:\program files\microsoft visual studio 8\vc\platformsdk\include\rpcndr.h(3119) : fatal error C1003: error count exceeds 100; stopping compilation

 When clicking the first error moves to code below

 /****************************************************************************


 *  Other MIDL base types / predefined types:
 ****************************************************************************/

typedef
unsigned char byte; typedef ::byte cs_byte;   // error indicates here

 Is there any comments?

 Thanks In Advance

Resul


Re: Building with Visual 2005 fails

by Curt Arnold-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Aug 12, 2009, at 1:28 AM, resul sahin wrote:

> Hello,
>
> When I build the log4cxx on Visual 2005 according to instructionshttp://logging.apache.org/log4cxx/building/vstudio.html
> , I am getting error below;
>  1>------ Build started: Project: apr, Configuration: Debug Win32  
> ------
>
> 1>Compiling...
> 1>userinfo.c
> 1>c:\program files\microsoft visual studio 8\vc\platformsdk\include
> \rpcndr.h(145) :   error C2059: syntax error : ':'
> 1>c:\program files\microsoft visual studio 8\vc\platformsdk\include
> \rpcndr.h(898) : error C2059: syntax error : ','
> .
> .
> .
> 1>c:\program files\microsoft visual studio 8\vc\platformsdk\include
> \rpcndr.h(3119) : fatal error C1003: error count exceeds 100;  
> stopping compilation
>
>  When clicking the first error moves to code below
>
>  /
> ****************************************************************************
>
>
>  *  Other MIDL base types / predefined types:
>
>  
> ****************************************************************************/
>
>
> typedef unsigned char byte;
> typedef ::byte cs_byte;   // error indicates here
>  Is there any comments?
>
>
>  Thanks In Advance
>
> Resul
>

Don't see how log4cxx is involved here.

I'm thinking that the compiler is doing strict C compiling for that  
file with the ".c" extension and the header file includes a C++  
construct (the leading :: to ensure that the global definition of byte  
is being used).  You can likely change a compiler setting to do C++  
compilation for all source files.