VS2008创建C++DLL, 该DLL中的Class并被C++App调用
Posted on 2010-02-04 17:50 mrfangzheng 阅读(1008) 评论(0) 编辑 收藏 举报- 创建DLL
- 创建Win32 Console Application工程TheClasses
- 创建选项中选中 DLL, Export Symbols
- 所有要导出的类都必须 class __declspec(dllexport) YourClassName {};
- 创建App
- 创建Win32 Console Application工程App
- 创建完毕后在工程属性页, Configuration=Active(Debug)
- 设置Linker->General->Additional Library Directories, 添加目录 Solution目录\Debug
- 设置Linker->Input->Additional Dependencies, 添加TheClasses.lib(扩展名是lib)