473,739 Members | 7,416 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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

2. C:.\Microsoft_V isual_Studio_.N ET_2003\Vc7\CRT \SRC

I also located a module xdebug.cpp in the same....\CRT\SR C 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******@inreac h.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\includ e\xdebug(29):
error C2365: 'new' : redefinition; previous definition was a 'member
function'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(29):
error C2491: 'new' : definition of dllimport data not allowed
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(29):
error C2078: too many initializers
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(29):
error C2440: 'initializing' : cannot convert from 'int' to 'void *'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(29):
error C2143: syntax error : missing ';' before '('
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(29):
error C2226: syntax error : unexpected type 'size_t'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(30):
error C2059: syntax error : ')'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(33):
warning C4229: anachronism used : modifiers on data are ignored
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(33):
error C2365: 'new' : redefinition; previous definition was a 'member
function'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(33):
error C2491: 'new' : definition of dllimport data not allowed
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(33):
error C2078: too many initializers
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(33):
error C2440: 'initializing' : cannot convert from 'int' to 'void *'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(33):
error C2143: syntax error : missing ';' before '['
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(33):
error C3409: empty attribute block is not allowed
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\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\includ e\xdebug(34):
error C2143: syntax error : missing ';' before ','
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(34):
error C2059: syntax error : ','
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\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
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\includ e
and a second in:
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\crt\sr c
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******@inreac h.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\includ e\xdebug(29):
error C2365: 'new' : redefinition; previous definition was a 'member
function'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(29):
error C2491: 'new' : definition of dllimport data not allowed
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(29):
error C2078: too many initializers
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(29):
error C2440: 'initializing' : cannot convert from 'int' to 'void *'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(29):
error C2143: syntax error : missing ';' before '('
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(29):
error C2226: syntax error : unexpected type 'size_t'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(30):
error C2059: syntax error : ')'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(33):
warning C4229: anachronism used : modifiers on data are ignored
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(33):
error C2365: 'new' : redefinition; previous definition was a 'member
function'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(33):
error C2491: 'new' : definition of dllimport data not allowed
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(33):
error C2078: too many initializers
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(33):
error C2440: 'initializing' : cannot convert from 'int' to 'void *'
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(33):
error C2143: syntax error : missing ';' before '['
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(33):
error C3409: empty attribute block is not allowed
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\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\includ e\xdebug(34):
error C2143: syntax error : missing ';' before ','
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\xdebug(34):
error C2059: syntax error : ','
d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\includ e\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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1117
by: Severino | last post by:
Hi all, we have developed a .NET component for use inside Windows Forms: this component has been written using VC++.NET (2003) and is working perfectly when inserted inside VC#.NET or VB.NET projects; its generated assembly is inside MyAssembly.dll When used inside a VC++.NET project it appears correctly over forms at design time but when trying to compile the project we get the following error:
0
1455
by: Severino | last post by:
Hi all, we have developed a .NET component for use inside Windows Forms: this component has been written using VC++.NET (2003) and is working perfectly when inserted inside VC#.NET or VB.NET projects; its generated assembly is inside MyAssembly.dll When used inside a VC++.NET project it appears correctly over forms at design time but when trying to compile the project we get the following error:
10
2689
by: Julian | last post by:
I get the following error when i try to link a fortran library to a c++ code in .NET 2005. LINK : fatal error LNK1104: cannot open file 'libc.lib' the code was working fine when built using .NET2003. also, when I do not try to link the fortran library (just to see if that was the cause), it builds the exe without any problems. i don't even know how to begin addressing this problem...any help would be
1
4326
by: Michel | last post by:
In VC++ from Visual Studio 2005 the following occurs: If I try to compile anyting, even a newly created empty MFC application with 1 empty dialog, I get the following 2 errors: Compiling... stdafx.cpp c:\program files\microsoft visual studio 8\vc\include\excpt.h(33) : error C2144: syntax error : 'int' should be preceded by ';' c:\program files\microsoft visual studio 8\vc\include\excpt.h(33) : error C4430: missing type specifier - int...
2
1622
by: Chukkalove | last post by:
I'm sorry this message is so long. I have had to make some changes to an application written by a previous developer who used unmanaged serialization to store complex objects to file. The application is a RAD form designer to design screens for an embedded system and he only allowed for a single type of target system. My company now needs a designer for a 2nd type of system but because of the unmanaged serialization, any changes to the...
3
4011
by: Gwarg | last post by:
Hello I hope someone has encountered this and knows what the problem is. I've taken over an mfc ocx project and i am normally not an mfc programmer. I was trying to change settings to allow me to save the ocx in another name. While i was trying to do this something went wrong and the project started giving complie errors on the dispatch map. I have made no changes what so ever to the code or any project files. I even reverted all the...
0
1530
by: fabioraciti | last post by:
I try to compile a project built using VC++6 in VC++ 2005 and got following errors when trying to build the project after clearing out all the other errors in *.CPP file: error C2248: 'CObject::CObject': cannot access private member declared in class 'CObject' file c:\programmi\microsoft visual studio 8\vc\atlmfc\include \afx.h(553) : see declaration of 'CObject::CObject' c:\programmi\microsoft visual studio...
8
3468
by: jean.daniel.michaud | last post by:
Hi all, Something I don't get. The code is: // snippet on #include <list> #include <iostream> int main()
2
4139
by: BruceWho | last post by:
I downloaded boost1.35.0 and built it with following command: bjam --toolset=msvc-7.1 --variant=release --threading=multi -- link=shared --with-system stage and it failed to compile, error message is: E:\software\development\boost_1_35_0\boost_1_35_0>bjam -- toolset=msvc-7.1 --variant=release --threading=multi --link=shared --
0
8969
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8794
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9483
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9341
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9269
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9211
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6756
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6056
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4572
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.