Sign in to follow this  
Thanhda

Creating a DLL project in VC.net?

Recommended Posts

Thanhda    100
okay is there any tutorials on how this can be done. i see many for VC6, but none for 7, or 7.1 also for creating dll in 6.0 it doesnt create a lib file. only a dll. how do i get it to create a lib as well?

Share this post


Link to post
Share on other sites
trevaaar    235
Assuming that you want to create a regular, unmanaged DLL (not .NET), you should choose to make a Win32 Project in the New Project dialog. In the Win32 Application Wizard, go to the Application Settings section and choose DLL as the application type.

If you want to create a .lib with your DLL you have two options. You can add __declspec(dllexport) to the items you want to export into the library or you can add a .DEF file to your project with the symbols you wish to export. Keep in mind that the former option is a lot easier if you're working with C++ because of the C++ name mangling.

Share this post


Link to post
Share on other sites

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