Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Managed C++ Dll - Where's my output?

0 views
Skip to first unread message

quortex

unread,
Sep 20, 2005, 4:29:18 AM9/20/05
to
Hi,

I have created a very small test wrapper class in Managed C++ which
wraps up some very simple native code. I am using C# 2 + Visual Studio
2005 Beta 2.

I have the back end C++ library without CLR which is to be wrapped that
outputs fine to a static .lib as expected.

Then I import the .lib into a Managed C++ DLL (/CLR) and wrap it up in
a class. Everything compiles fine with no errors or warnings however my
DLL is not outputted into the debug folder.

It creates the .obj file and a manaifest file -
(myprogram.dll.intermediate.manifest) but there's no library (dll)
outputted.

I have checked all the settings and I am completely out of ideas. Why
isn't the DLL being outputted? Do I need to somehow declare what is
outputted and what isn't? I do recall dllimport and dllexport from back
in the day although it's a vague memory :)

I take it this obviously doesn't work like a normal .net assembly?
Please point me in the right direction. Thanks in advance.

Kind Regards,
Mark

Jochen Kalmbach [MVP]

unread,
Sep 20, 2005, 4:38:29 AM9/20/05
to
Hi quortex!

> I have created a very small test wrapper class in Managed C++ which
> wraps up some very simple native code. I am using C# 2 + Visual Studio
> 2005 Beta 2.

What project-type have you created?

For a C++/CLI assembly project you should take a "C++|CLR|Class Library"
project (File|New|Project...)

In the project properties under the "general" entry the should be the
following:
- Configuration Typ: Dynamic Library (DLL)
- Common language runtime support: Common Language Runtime Support (/clr)

And in the "Linker|General" there should be the pathe/filename of the
generated DLL.

--
Greetings
Jochen

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

quortex

unread,
Sep 20, 2005, 5:16:58 AM9/20/05
to
Hi,

Thanks for the reply. I just checked my project just incase but as I
thought yes I have a managed c++ project. It has /clr switch and is set
to be a DLL with linker output of $(OutDir)\$(ProjectName).dll.

It is outputting the .manifest file so I guess that's another sign it's
setup correctly. Perhaps I have missed something with the internal
structure of my library it just contains two classes and their
corresponding header files. Everything is very simple very clean with
no warnings or errors.

This is really holding me up and driving me mad to be honest. Any
ideas?

Kind Regards,
Mark

Jochen Kalmbach [MVP]

unread,
Sep 20, 2005, 5:33:57 AM9/20/05
to
Hi quortex!

> it just contains two classes and their
> corresponding header files. Everything is very simple very clean with
> no warnings or errors.

What classes? Managed or Unmanaged?
You need to have at least a managed class!
Can you post a small code-snipped?

quortex

unread,
Sep 20, 2005, 5:37:36 AM9/20/05
to
Jochen,

DOH!

My apologies I can't believe it the dll was being outputted but it was
being outputted to a debug folder of the solution root rather than the
project root.

I did a search for the dll and found it :( Tragic tragic it was working
all along.

Thanks for your help.

Mark

0 new messages