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

S

Semmel

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?
 
J

Jochen Kalmbach [MVP]

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<int> a;

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

Other types like

C5::CircularQueue<int> a;

are working without any problems...


I reported it here:
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=196156

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top