V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
proxytoworld
V2EX  ›  问与答

VS2017 怎么在一个项目里面生成多个 DLL,刚接触 dll 编写,现在只知道一个生成一个 dll 项目产出一个 dll,不知道有没有办法一个项目生成多个 dll 呢?

  •  
  •   proxytoworld · 2021-03-15 23:54:18 +08:00 · 713 次点击
    这是一个创建于 1158 天前的主题,其中的信息可能已经有所发展或是发生改变。
    6 条回复    2021-03-16 11:16:40 +08:00
    lcdtyph
        1
    lcdtyph  
       2021-03-16 00:03:02 +08:00 via iPhone
    你需要 solution,每个 solution 包含多个相互联系的项目,每个项目产生一个 dll
    ysc3839
        2
    ysc3839  
       2021-03-16 01:25:38 +08:00
    不行,可以新建多个项目,然后都添加到同一个“解决方案”下。
    ReferenceE
        3
    ReferenceE  
       2021-03-16 01:46:14 +08:00 via Android   ❤️ 1
    每个 dll 代码拆分成一个项目 project
    然后导入到同一个解决方案 solution (.sln)中即可
    参考微软文档概念
    A solution is simply a container used by Visual Studio to organize one or more related projects. When you open a solution in Visual Studio, it automatically loads all the projects that the solution contains.
    imjamespond2020
        4
    imjamespond2020  
       2021-03-16 09:01:00 +08:00 via Android
    可以用命令行啊 写个 makefile 开搞
    kiracyan
        5
    kiracyan  
       2021-03-16 11:05:44 +08:00
    你搞清楚 solution 和 project 就知道怎么操作了
    proxytoworld
        6
    proxytoworld  
    OP
       2021-03-16 11:16:40 +08:00
    @lcdtyph
    @ysc3839
    @ReferenceE
    现在是一个解决方案多个项目,一个项目一个 dll,看来没办法一个项目多个 dll
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5700 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 07:19 · PVG 15:19 · LAX 00:19 · JFK 03:19
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.