473,791 Members | 3,105 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

using c# assembly (C5 Generic Collection Lib) from C++/CLR

Hello,
I'd like to use the C5 Generic Collection Library (
http://www.itu.dk/research/c5/ ) in my C++/CLI project. However I
always get an fatal compiler error C1001.

It already happens when you just add the two obvious lines to the
CLR-console type wizard generated main method:

#include "stdafx.h"
#using <C5.dll // <---- this line is new

using namespace System;

int main(array<Syst em::String ^^args)
{
C5::ArrayList<S tring^>^ stringList = gcnew C5::ArrayList<S tring^>();
// <---- this line is new

Console::WriteL ine(L"Hello World");

Console::ReadKe y(false);
return 0;
}

I of course compile with /clr switch. Regardless of the configuration
(Debug/Release) I always get the compiler output:

..\TestC5Lib.cp p(10) : fatal error C1001: An internal error has occurred
in the compiler.
(compiler file 'msc1.cpp', line 1392)
To work around this problem, try simplifying or changing the program
near the locations listed above.
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more
information
.\TestC5Lib.cpp (10) : see reference to class generic
instantiation 'C5::ArrayList' being compiled
with
[
T=System::Strin g ^
]
I already tried compiling the C5 project myself in Debug/Release mode
but this did'nt help.

Could this be a problem of the C5.dll or my way of using the C#
assembly in general?

Sep 6 '06 #1
1 2504
Hi Semmel!
I'd like to use the C5 Generic Collection Library (
http://www.itu.dk/research/c5/ ) in my C++/CLI project. However I
always get an fatal compiler error C1001.
If I just reference the C5.dll, then there is no problem.

But if I I reference a type like:

C5::ArrayList<i nta;

It also gives me the an internal compiler error... (in all three
possible /clr-settings)

Other types like

C5::CircularQue ue<inta;

are working without any problems...
I reported it here:
https://connect.microsoft.com/Visual...dbackID=196156

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
Sep 6 '06 #2

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

Similar topics

7
9114
by: Paul Welter | last post by:
Is there anyway to do the following? Type myType = typeof(User); Collection<myType> list = new Collection<myType>(); I know I could just use User instead of myType but have a function that takes a type and populates a collection then calls SetValue using reflection. How would I create the generic collection to fill it and call SetValue?
8
1833
by: JAL | last post by:
Here is my first attempt at a deterministic collection using Generics, apologies for C#. I will try to convert to C++/cli. using System; using System.Collections.Generic; using System.Text; namespace DeterminedGenericCollection { // I got tired of copy and pasting IDisposable
2
1770
by: dcew | last post by:
Here's what I'm trying to understand; how can you store a generic collection in a variable/field? If I have an abstract generic collection class as follows... public abstract class BizCollection<T> : Collection<T> where T : BizBase { // Collection Implementation override void InsertItem(int index, T item)
8
3283
by: Steven Cummings | last post by:
Hello, I've scoured this usenet group and didn't find anything specific to my problem, so hopefully this won't be a repeated question. I'm all but certain it's not. I would like to *declare* (not just instantiate at runtime) a generic collection whose element-type is a generic class too. But I don't want to declare what the element-type's generic parameters are.
1
2198
by: Peter Sestoft | last post by:
We have just released C5, a library of generic collection classes for C# and other CLI languages, as found in Microsoft .Net version 2.0. C5 provides functionality and data structures not provided by the standard .Net System.Collections.Generic namespace, such as persistent tree data structures, heap based priority queues and hash indexed array lists and linked lists. Also, the library is more comprehensive than collection class...
2
1722
by: cylt | last post by:
Hi, I would like to have something like that : IList<IUser> list2 = list1 as IList<IUser>; where list1 is a generic collection of User ( IList list1<User>=new List<User>() ) and where User implement the interface IUser. But this did not work... I thought that as User implement IUser it was possible to cast the generic
6
5645
by: SharpCoderMP | last post by:
hi, until .net 2.0 i've been writing my own collections derived from CollectionBase. Now with the generics it is much easier to do that... but! i have some questions about generic lists of complex objects. consider this short example: class MyComplexClass : IDisposable {
6
1542
by: Lee Crabtree | last post by:
Pinning a regular managed array is pretty easy in C++/CLI, such as: if buffer is defined thusly: array<System::Byte^buffer pinning it would be something like: pin_ptr<unsigned charpinBuf = &buffer; What I'm curious about, though, is whether or not it's possible to pin a generic collection in a similar manner. The app I'm working on will be
5
1869
by: Ethan Strauss | last post by:
Hi, I have just started using Generic Collections for .Net 2.0 and so far they are working very nicely for me. But, I do have a couple of questions. If I have a Generic collection which has a type which is a reference type, is there a way to get Collection.ContainsKey(RefKey) and Collection to work with different instances of equal keys? For example, I have defined a class of "codon" and I have made a dictionary private...
0
9669
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...
1
10155
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
9029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7537
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
6776
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
5431
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...
0
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4110
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 we have to send another system
3
2916
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.