下面就為大家分享一下在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; } } }}當然代碼根據自己需要寫

右鍵 生成

然后 通過 在文件資源管理器中打開文件夾找到生成的dll文件

VS2015生成64位dll文件
導入自己的源文件,準備生成DLL文件。也可以自己創建。
右鍵項目,進入屬性,修改Configuration Type 為 DLL。

修改為64位,Configureation Manager ->

->Active solution platform ,x新添加一個x64。 下面的會自動變為x64.

然后運行,會生成一個x64/debug的目錄,里面即為64位DLL.
錯誤集:
1. Error D8016 '/ZI' and '/Gy-' ......
解決:Debug -> c/c++里,修改為Program Database(/Zi).

2.LNK2001,LNK2019,添加兩個靜態庫。ws2_32.lib" , "winmm.lib。

新聞熱點
疑難解答