You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Kirill Magdalinin <km...@alliedtesting.com> on 2004/07/13 14:08:51 UTC
RE: VS 7.1 GUI projects problem - RESOLVED
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
>