PC Review


Reply
Thread Tools Rate Thread

Wrapping unmanaged C++

 
 
Arthur Roodenburg
Guest
Posts: n/a
 
      24th Nov 2004
Hello,

I have a huge set of unmanaged C++ classes, which I wrapped in managed C++.
Everything is in one assembly.
Using my wrapper in C# works fine.
However, when I would like to use the wrapper in managed C++ I get the
following warnings and errors:

warning C4945: 'MyType' : cannot import symbol from 'mydll.dll': as
'MyNamespace::MyType' has already been imported from another assembly
'mydll.dll'
stdafx.cpp(0) : see declaration of 'MyNamespace::MyType' first seen type is
used; re-order imported assemblies to use the current type

(Is this caused by forward declarations?)

And:

error C3635: 'MyUnmanagedNamespace::MyUnmanagedType': undefined native type
used in 'MyNamespace::MyType'; imported native types must be defined in the
importing source code
did you forget to include a header file?

My questions:

How can I solve these problems WITHOUT having to include my unmanaged header
files in the project that uses my assembly? I am not using any unmanaged
stuff, so why would I like to include anything?
I want to re-use the code at binary level only.

Greets,
Arthur



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wrapping unmanaged C++ callbacks in C# Marc Eaddy Microsoft C# .NET 1 3rd Apr 2008 05:21 PM
Problem wrapping unmanaged dll jsroberts@highstream.net Microsoft VC .NET 1 6th Sep 2005 11:55 PM
advise on wrapping unmanaged dll roni Microsoft VC .NET 1 7th Apr 2005 04:03 AM
Wrapping unmanaged C++ Arthur Roodenburg Microsoft Dot NET 0 24th Nov 2004 10:49 AM
wrapping unmanaged classes and stl =?Utf-8?B?Um90aA==?= Microsoft VC .NET 0 22nd Apr 2004 10:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:27 PM.