下面就為大家分享一下在vs2005中生成dll文件的步驟圖文版
新建項目> 模板 > windows > 類庫
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
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。