473,508 Members | 2,329 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C2300 error : 'System::Enum' : class does not have a destructor called '~TYPE'

I am having trouble trying to compile existing code with the /clr
flag.

The following error occurs and I can't figure it out how to fix this
problem.

I have the following declaration:
typedef enum t_enEtatListeAuto
{
enEtatAucun,
enEtatCoche,
enEtatCroix
};

This type is then used in a CList:
CList<t_enEtatListeAuto,t_enEtatListeAuto> m_oListeDesEtats;

The following compile error occurs:

C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\atlmfc\include\afxtempl.h(864) : error C2300: 'System::Enum'
: class does not have a destructor called '~TYPE'
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\xmemory(136) : while compiling class-template member
function 'void CList<TYPE,ARG_TYPE>::RemoveAll(void)'
with
[
TYPE=t_enEtatListeAuto,
ARG_TYPE=t_enEtatListeAuto
]
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\xmemory(136) : while compiling class-template member
function 'CList<TYPE,ARG_TYPE>::~CList(void)'
with
[
TYPE=t_enEtatListeAuto,
ARG_TYPE=t_enEtatListeAuto
]
STY_Ctl_Liste.h(110) : see reference to class template
instantiation 'CList<TYPE,ARG_TYPE>' being compiled
with
[
TYPE=t_enEtatListeAuto,
ARG_TYPE=t_enEtatListeAuto
]
Any help would be appreciated.

Karine
Nov 17 '05 #1
1 2159
Hy!

I think you have to make the following line to your cpp file of the List:
// explizite Instanzierung:
template class CList< t_enEtatListeAuto>;
Just add this at the beginning of the cpp file.

Hope this helps!

"Karine Pinault" <kp******@yahoo.fr> schrieb im Newsbeitrag
news:a2*************************@posting.google.co m...
I am having trouble trying to compile existing code with the /clr
flag.

The following error occurs and I can't figure it out how to fix this
problem.

I have the following declaration:
typedef enum t_enEtatListeAuto
{
enEtatAucun,
enEtatCoche,
enEtatCroix
};

This type is then used in a CList:
CList<t_enEtatListeAuto,t_enEtatListeAuto> m_oListeDesEtats;

The following compile error occurs:

C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\atlmfc\include\afxtempl.h(864) : error C2300: 'System::Enum'
: class does not have a destructor called '~TYPE'
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\xmemory(136) : while compiling class-template member
function 'void CList<TYPE,ARG_TYPE>::RemoveAll(void)'
with
[
TYPE=t_enEtatListeAuto,
ARG_TYPE=t_enEtatListeAuto
]
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\xmemory(136) : while compiling class-template member
function 'CList<TYPE,ARG_TYPE>::~CList(void)'
with
[
TYPE=t_enEtatListeAuto,
ARG_TYPE=t_enEtatListeAuto
]
STY_Ctl_Liste.h(110) : see reference to class template
instantiation 'CList<TYPE,ARG_TYPE>' being compiled
with
[
TYPE=t_enEtatListeAuto,
ARG_TYPE=t_enEtatListeAuto
]
Any help would be appreciated.

Karine

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4789
by: Josh | last post by:
Hi Guys, I have hit a wall with the my project... The problem is that i need to get the type of a usercontrol that is not in the assembly of the page that is tryiong to call it. if anyone knows of...
1
2892
by: Rui Macdonald | last post by:
I trying some asp from angGoGo PhotoControl and when I star it on my computer always gives the following message, Can you please help me? :-( ------------------------------------------- ...
5
1823
by: Don | last post by:
I have an array of System.type and I need to go through the array and perform different logic depending on the type stored in the array. I want to do: if (typeof typeCollection(i) is String)...
5
3656
by: crystalattice | last post by:
I've finally figured out the basics of OOP; I've created a basic character creation class for my game and it works reasonably well. Now that I'm trying to build a subclass that has methods to...
1
5222
by: Powers | last post by:
I currently have a large number of enums implemented into my Web Service. I am reworking the XML serialization of these enums. At present, each enum has hardcoded values, for example: xAttrs...
1
2344
by: Jeff Mason | last post by:
I am observing some puzzling behavior with the GetValues method of enumerations. I wonder if this something I just don't understand, or is this just wrong. The documentation for the GetValues...
1
304
by: Steve Kershaw | last post by:
Hi, I keep on getting this error: "The current configuration system does not support user-scoped settings." I'm trying to use a DLL that I have developed previously. When I try to access a...
1
1338
by: ceestand | last post by:
I'm trying to make a change to an object depending contextually on it's type. The following code, even though I pass the Int32 into the function as an Object, still knows it's an Int32. public...
3
1392
by: Nathan Sokalski | last post by:
I have the following code: Dim values As New ArrayList() values.Add("Yes") values.Add("No") values.Add("Maybe") values.Add("Whatever") dim x as String()=values.ToArray() However, I recieve...
0
7323
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,...
1
7039
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...
0
7494
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...
0
5626
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5050
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...
0
4706
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...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1553
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.