Jump to content
  • Advertisement
Sign in to follow this  
Diirewolf

C++ Class Library with Visual Studio

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

Alright I use Visual Studio (2005) for C/C++ and C# programming. I want to know how to program a c++ class library using Visual Studio. I know how to do this in C# and I know how to use the compiled library in my programs. How do I do this in C++. All I get when I compile is a .dll file and I dont know how to use this in my C++ programs. Also what would be an easy way to test the library. In C# all you need to do is reference a class library project or a .dll and you're good to go. How would I do something similar to this in C++? Please help Thanks

Share this post


Link to post
Share on other sites
Advertisement
You can create a Static Lib project and put your classes into it. Than your normal project just link the file(*.lib) which your static lib project producing.

You can put those 2 projects into a single solution and instead of manual linkage you can use "add reference" function of visual studio.

Share this post


Link to post
Share on other sites
Ok this article says how to make dll from a win32 console application. What i want to do is create a class library with classes etc. which I can use inside a win32 console app.
How can I do this?

Share this post


Link to post
Share on other sites
My example shows you how to produce and use a dynamically linked library, you can put classes, functions or constants into it and export it.
It has nothing to do with a console application directly, it is just the way you have to setup your project to create dlls.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!