加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

VS2015 C#生成dll文件的方法(32/64)

发布时间:2020-12-15 06:13:40 所属栏目:百科 来源:网络整理
导读:下面就为大家分享一下在vs2005中生成dll文件的步骤图文版 新建项目 模板 windows 类库 using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ClassLibrary2{ public class Class1 {

下面就为大家分享一下在vs2005中生成dll文件的步骤图文版

新建项目> 模板 > windows > 类库

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ClassLibrary2
{
  public class Class1
  {
    private int _age;

    public int Age
    {
      get
      {
        return _age;
      }

      set
      {
        _age = value;
      }
    }


  }
}

当然代码根据自己需要写,要不就参考 https://www.oudahe.com/p/29829/

右键 生成

然后 通过 在文件资源管理器中打开文件夹找到生成的dll文件

VS2015生成64位dll文件

导入自己的源文件,准备生成DLL文件。也可以自己创建。
右键项目,进入属性,修改Configuration Type 为 DLL。

修改为64位,Configureation Manager ->

->Active solution platform,x新添加一个x64。 下面的会自动变为x64.

然后运行,会生成一个x64debug的目录,里面即为64位DLL.

错误集:
1. Error D8016 '/ZI' and '/Gy-' ......

解决:Debug -> c/c++里,修改为Program Database(/Zi).

2.LNK2001,LNK2019,添加两个静态库。ws2_32.lib" , "winmm.lib。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读