VS2008创建C++DLL, 该DLL中的Class并被C++App调用

  1. 创建DLL
    1. 创建Win32 Console Application工程TheClasses 
    2. 创建选项中选中 DLL, Export Symbols
    3. 所有要导出的类都必须 class __declspec(dllexport) YourClassName {};
  2. 创建App
    1. 创建Win32 Console Application工程App
    2. 创建完毕后在工程属性页, Configuration=Active(Debug)
      1. 设置Linker->General->Additional Library Directories, 添加目录 Solution目录\Debug
      2. 设置Linker->Input->Additional Dependencies, 添加TheClasses.lib(扩展名是lib)
原文地址:https://www.cnblogs.com/mrfangzheng/p/1663854.html