Sign in to follow this  

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

This topic is 3618 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
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

This topic is 3618 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this