How to compile a cpp to a dll in visual studio 201

2019-04-13 00:45发布

I have a cpp which depends on couple of headers in the same folder. I need to compile this cpp to a dll. How do I do it in visual studio 2010 expresS?

I found few articles on web for visual studio 2008 but I could not use it in 2010. Any pointers would be highly appreciated. Btw, I am a java programmer. CPP is all new to me, I am compiling some one else's cpp to dll.

Thanks, Abi

2条回答
Melony?
2楼-- · 2019-04-13 01:14

Right-click on your project in the Solution Explorer, and select Properties.... Under Configuration Properties -> General there's an option called Configuration Type. If you change it to Dynamic Library (.dll), your project will generate a DLL when it is built.

查看更多
Emotional °昔
3楼-- · 2019-04-13 01:25

As a start point, you can use "Create New Project from Existing Code" as described here - specify that you want a DLL project when prompted.

Once you have a project in place that encapsulates your CPP code file, you can find other info on specific project settings in MSDN, or post new questions as you need to.

查看更多
登录 后发表回答