下面就為大家分享一下在vs2005中生成dll文件的步驟圖文版
新建項(xiàng)目> 模板 > windows > 類庫(kù)
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; } } } } |
當(dāng)然代碼根據(jù)自己需要寫,要不就參考
右鍵 生成
然后 通過(guò) 在文件資源管理器中打開(kāi)文件夾找到生成的dll文件
vs2015生成64位dll文件
導(dǎo)入自己的源文件,準(zhǔn)備生成dll文件。也可以自己創(chuàng)建。
右鍵項(xiàng)目,進(jìn)入屬性,修改configuration type 為 dll。
修改為64位,configureation manager ->
->active solution platform ,x新添加一個(gè)x64。 下面的會(huì)自動(dòng)變?yōu)閤64.
然后運(yùn)行,會(huì)生成一個(gè)x64\debug的目錄,里面即為64位dll.
錯(cuò)誤集:
1. error d8016 '/zi' and '/gy-' ......
解決:debug -> c/c++里,修改為program database(/zi).
2.lnk2001,lnk2019,添加兩個(gè)靜態(tài)庫(kù)。ws2_32.lib" , "winmm.lib。