logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kirill Magdalinin" <kmagdali...@alliedtesting.com>
Subject RE: VS 7.1 GUI projects problem - RESOLVED
Date Tue, 13 Jul 2004 12:08:51 GMT
I found the cause of the problem, I added the header file after the
following declarations

#ifdef _DEBUG
#define new DEBUG_NEW
#endif

The header file must be added before those.

Kirill


> -----Original Message-----
> From: Kirill Magdalinin 
> Sent: Tuesday, July 13, 2004 3:15 PM
> To: log4cxx-user@logging.apache.org
> Subject: VS 7.1 GUI projects problem
> 
> 
> Hello,
> 
> I successufully compiled and used log4cxx static library with 
> a sample VS 7.1 console project, by failed to compile any GUI 
> (dialog or window
> based) projects. Adding the following line to project source code
> 
> #include <log4cxx/logger.h>
> 
> causes the following compilation warnigns and errors:
> 
> c:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\include\xdebug(29) : warning C4229: anachronism used 
> : modifiers on data are ignored c:\Program Files\Microsoft 
> Visual Studio .NET
> 2003\Vc7\include\xdebug(29) : error C2365: 'new' : 
> redefinition; previous definition was a 'member function' 
> c:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\include\xdebug(29) : error C2491: 'new' : definition 
> of dllimport data not allowed c:\Program Files\Microsoft 
> Visual Studio .NET
> 2003\Vc7\include\xdebug(29) : error C2078: too many 
> initializers c:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\include\xdebug(29) : error C2440: 'initializing' : 
> cannot convert from 'int' to 'void *'
>         Conversion from integral type to pointer type 
> requires reinterpret_cast, C-style cast or function-style 
> cast c:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\include\xdebug(29) : error C2143: syntax error : 
> missing ';' before '(' c:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\include\xdebug(29) : error C2226: syntax error : 
> unexpected type 'size_t' c:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\include\xdebug(30) : error C2059: syntax error : ')' 
> c:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\include\xdebug(33) : warning C4229: anachronism used 
> : modifiers on data are ignored c:\Program Files\Microsoft 
> Visual Studio .NET
> 2003\Vc7\include\xdebug(33) : error C2365: 'new' : 
> redefinition; previous definition was a 'member function' 
> c:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\include\xdebug(33) : error C2491: 'new' : definition 
> of dllimport data not allowed c:\Program Files\Microsoft 
> Visual Studio .NET
> 2003\Vc7\include\xdebug(33) : error C2078: too many 
> initializers c:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\include\xdebug(33) : error C2440: 'initializing' : 
> cannot convert from 'int' to 'void *'
>         Conversion from integral type to pointer type 
> requires reinterpret_cast, C-style cast or function-style 
> cast c:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\include\xdebug(33) : error C2143: syntax error : 
> missing ';' before '[' c:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\include\xdebug(33) : error C3409: empty attribute 
> block is not allowed c:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\include\xdebug(34) : warning C4091: '' : ignored on 
> left of '__w64 unsigned int' when no variable is declared 
> c:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\include\xdebug(34) : error C2143: syntax error : 
> missing ';' before ',' c:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\include\xdebug(34) : error C2059: syntax error : ',' 
> c:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\include\xdebug(34) : fatal error C1004: unexpected 
> end of file found
> 
> 
> How this can be resolved?
> 
> regards,
> 
> Kirill Magdalinin
> 

Mime
View raw message