473,378 Members | 1,209 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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<System::String ^^args)
{
C5::ArrayList<String^>^ stringList = gcnew C5::ArrayList<String^>();
// <---- this line is new

Console::WriteLine(L"Hello World");

Console::ReadKey(false);
return 0;
}

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

..\TestC5Lib.cpp(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::String ^
]
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 2479
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<inta;

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

Other types like

C5::CircularQueue<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
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...
8
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; ...
2
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...
8
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*...
1
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...
2
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...
6
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...
6
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 =...
5
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.