By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,657 Members | 862 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,657 IT Pros & Developers. It's quick & easy.

When I compile a VC++6.0 project in vc++.net ,error C2365 occurred . What's wrong with me ?

P: n/a
I used vc++.net (visual studio .net ) to open a project which can work well
in vc++6.0. I succeeded in compiling the project in vc++.net in release
mode .
But when I tried to compile the project in debug mode, the following errors
happened:

d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(29):
error C2365: 'new' : redefinition; previous definition was a 'member
function'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(29):
error C2491: 'new' : definition of dllimport data not allowed
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(29):
error C2078: too many initializers
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(29):
error C2440: 'initializing' : cannot convert from 'int' to 'void *'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(29):
error C2143: syntax error : missing ';' before '('
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(29):
error C2226: syntax error : unexpected type 'size_t'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(30):
error C2059: syntax error : ')'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(33):
warning C4229: anachronism used : modifiers on data are ignored
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(33):
error C2365: 'new' : redefinition; previous definition was a 'member
function'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(33):
error C2491: 'new' : definition of dllimport data not allowed
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(33):
error C2078: too many initializers
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(33):
error C2440: 'initializing' : cannot convert from 'int' to 'void *'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(33):
error C2143: syntax error : missing ';' before '['
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(33):
error C3409: empty attribute block is not allowed
d:\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
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(34):
error C2143: syntax error : missing ';' before ','
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(34):
error C2059: syntax error : ','
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(34):
fatal error C1004: unexpected end of file found

all of the errors and warnings are happened in the file xdebug. I do not
know how to avoid the errors. Can anyone help me? thanks.

Nov 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I am also having the exact same set of error messages appear when trying to
recompile an existing system. I located the module XDEBUG in two locations in
the Visual Studio libraries:

1. C:.\Microsoft Visual Studio .NET 2003\Vc7\INCLUDE

2. C:.\Microsoft_Visual_Studio_.NET_2003\Vc7\CRT\SRC

I also located a module xdebug.cpp in the same....\CRT\SRC library. This
program incorporates a #INCLUDE <xdebug> statement, and has an annotation "//
new and delete operators for debug CRT heap use by C++ Library". I've tried
compiling my program using each of these components. Using the ...\Include
version, I get the C2365 error(s). Using the ...\crt\src version, I get a
C1189 error message - invalid use of c header message.

I can locate no documentation as to the application or use of the XDEBUG
module or the program on the Microsoft website. I think I understand the
functional use of XDEBUG, and the XDEBUG module <xdebug> is used in several
other modules in the \CRT\SRC directory.

Is there someone that can point me to an information source that covers this
issue, or has experience solving this problem?

Thank you in advance for any help in dealing with this matter.
I'm new to C++ programming and am wondering if perhaps I am missing
something obvious.

Pat McAvoy
pd******@inreach.com

"Qiao Yun" wrote:
I used vc++.net (visual studio .net ) to open a project which can work well
in vc++6.0. I succeeded in compiling the project in vc++.net in release
mode .
But when I tried to compile the project in debug mode, the following errors
happened:

d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(29):
error C2365: 'new' : redefinition; previous definition was a 'member
function'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(29):
error C2491: 'new' : definition of dllimport data not allowed
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(29):
error C2078: too many initializers
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(29):
error C2440: 'initializing' : cannot convert from 'int' to 'void *'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(29):
error C2143: syntax error : missing ';' before '('
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(29):
error C2226: syntax error : unexpected type 'size_t'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(30):
error C2059: syntax error : ')'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(33):
warning C4229: anachronism used : modifiers on data are ignored
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(33):
error C2365: 'new' : redefinition; previous definition was a 'member
function'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(33):
error C2491: 'new' : definition of dllimport data not allowed
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(33):
error C2078: too many initializers
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(33):
error C2440: 'initializing' : cannot convert from 'int' to 'void *'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(33):
error C2143: syntax error : missing ';' before '['
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(33):
error C3409: empty attribute block is not allowed
d:\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
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(34):
error C2143: syntax error : missing ';' before ','
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(34):
error C2059: syntax error : ','
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(34):
fatal error C1004: unexpected end of file found

all of the errors and warnings are happened in the file xdebug. I do not
know how to avoid the errors. Can anyone help me? thanks.

Nov 17 '05 #2

P: n/a
I am getting the same assortment of errors in my attempts to recompile a C++
application that was created several years ago, but runs fine in several
sites. I see two versions of XDEBUG: one in
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include
and a second in:
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\crt\src
I also see program xdebug.cpp in the ...\crt\src directory.
it has the annotation:

"//new and delete operators for debug CRT heap use by C++ Library". I can
locate no information on these components, although I think I understand
their role in debug heap management functionality.

Is there anyone that can refer me to an information source on this problem,
or perhaps knows a solution?

Your help is much appreciated!

Thank you in advance,

Pat McAvoy
pd******@inreach.com

"Qiao Yun" wrote:
I used vc++.net (visual studio .net ) to open a project which can work well
in vc++6.0. I succeeded in compiling the project in vc++.net in release
mode .
But when I tried to compile the project in debug mode, the following errors
happened:

d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(29):
error C2365: 'new' : redefinition; previous definition was a 'member
function'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(29):
error C2491: 'new' : definition of dllimport data not allowed
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(29):
error C2078: too many initializers
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(29):
error C2440: 'initializing' : cannot convert from 'int' to 'void *'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(29):
error C2143: syntax error : missing ';' before '('
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(29):
error C2226: syntax error : unexpected type 'size_t'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(30):
error C2059: syntax error : ')'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(33):
warning C4229: anachronism used : modifiers on data are ignored
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(33):
error C2365: 'new' : redefinition; previous definition was a 'member
function'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(33):
error C2491: 'new' : definition of dllimport data not allowed
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(33):
error C2078: too many initializers
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(33):
error C2440: 'initializing' : cannot convert from 'int' to 'void *'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(33):
error C2143: syntax error : missing ';' before '['
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(33):
error C3409: empty attribute block is not allowed
d:\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
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(34):
error C2143: syntax error : missing ';' before ','
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(34):
error C2059: syntax error : ','
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xdebug(34):
fatal error C1004: unexpected end of file found

all of the errors and warnings are happened in the file xdebug. I do not
know how to avoid the errors. Can anyone help me? thanks.

Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.