468,511 Members | 1,531 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,511 developers. It's quick & easy.

Wrapping unmanaged C++

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

Jul 21 '05 #1
0 1140

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by David Kantowitz | last post: by
reply views Thread by sklett | last post: by
reply views Thread by Roth | last post: by
1 post views Thread by roni | last post: by
1 post views Thread by jsroberts | last post: by
5 posts views Thread by Lee Crabtree | last post: by
reply views Thread by Arthur Roodenburg | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.