Jump to content
  • Advertisement
Sign in to follow this  
chrisliando

[.net] How to create, compile and run DLL in Visual C++ Whidbey?

This topic is 3805 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

(1) I am using Visual C++ 2005 Express Edition (Whidbey) and .Net framework 2.0. I would like to know how to create, compile and set a DLL for ready to be used. I have got codes in C#. They consists of several .cs files and they have the same namespace, like this: using System; using System.Collections; namespace Build { .... } so all of them(.cs files) have the same header like above and the output is "Build.dll". In case of configuring the Visual C++ compiler settings or options, please tell me how to configure it out. (2) Is it possible to execute / use C# based dll in C++ Whidbey? If it is possible, please tell me how to do that. (3) For building a DLL in C++ Whidbey, what file do I need to work with in 1 Project/Solution? ".h" or ".cpp" files? Because when I looked at the C# codes, they use ".cs" files. I knew that in C# ".h" files are not available so it must use the ".cs" files. How is that in C++? Thank you very much..

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by chrisliando
(1)
I am using Visual C++ 2005 Express Edition (Whidbey) and .Net framework 2.0.

I would like to know how to create, compile and set a DLL for ready to be used.


Create a c++/clr class library, make all your headers visible from the main file, and build it.

Quote:
Original post by chrisliando
I have got codes in C#. They consists of several .cs files and they have the same namespace, like this:

using System;
using System.Collections;
namespace Build
{

....

}

so all of them(.cs files) have the same header like above and the output is "Build.dll".


In case of configuring the Visual C++ compiler settings or options, please tell me how to configure it out.


I have no idea what you're asking here.

Quote:
Original post by chrisliando
(2)
Is it possible to execute / use C# based dll in C++ Whidbey? If it is possible, please tell me how to do that.


You can reference a c++/clr dll from c# the same way as any other .net library.

Quote:
Original post by chrisliando
(3)
For building a DLL in C++ Whidbey, what file do I need to work with in 1 Project/Solution?

".h" or ".cpp" files? Because when I looked at the C# codes, they use ".cs" files. I knew that in C# ".h" files are not available so it must use the ".cs" files.

How is that in C++?


Thank you very much..


I'm sorry, but if you don't know what cpp and h files are, you really, really, need to step back and do something simpler before tangling with a beast like c++/clr.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!