Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / September 2005

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
quortex - 20 Sep 2005 09:29 GMT
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] - 20 Sep 2005 09:38 GMT
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.

Signature

Greetings
  Jochen

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

quortex - 20 Sep 2005 10:16 GMT
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] - 20 Sep 2005 10:33 GMT
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?

Signature

Greetings
  Jochen

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

quortex - 20 Sep 2005 10:37 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.