VB编译标准DLL
http://webservices.ctocio.com.cn/net/308/9415308.shtml
我按照这个来做了,可是到了最后一步编译。提示:
d:\Program Files (x86)\Microsoft Visual Studio\VB98>link2.exe "D:\abc\Class1.obj" "D:\abc\Module1.obj" "D:\abc\Project1.obj" "d:\Program Files (x86)\Microsoft Visual Studio\VB98\VBAEXE6.LIB" /ENTRY:__vbaS /EXPORT:mm /EXPORT:mathadd /EXPORT:rit /OUT:"D:\abc\ProjectOK1.dll" /BASE:0x11000000 /SUBSYSTEM:WINDOWS,4.0 /VERS
Microsoft (R) Incremental Linker Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
LINK2 : warning LNK4044: unrecognized option "VERS"; ignored
Project1.obj : warning LNK4104: export of symbol "DllUnregisterServer" should be PRIVATE
Project1.obj : warning LNK4104: export of symbol "DllGetClassObject" should be PRIVATE
Project1.obj : warning LNK4104: export of symbol "DllRegisterServer" should be P
RIVATE
Project1.obj : warning LNK4104: export of symbol "DllCanUnloadNow" should be PRIVATE
Project1.obj : error LNK2001: unresolved external symbol mathadd
Project1.obj : error LNK2001: unresolved external symbol mm
Project1.obj : error LNK2001: unresolved external symbol rit
D:\abc\ProjectOK1.lib : fatal error LNK1120: 3 unresolved externals
LINK2 : fatal error LNK1141: failure during build of exports file
Private Sub Main()
Open "CmdLine.txt" For Output As #1
Print #1, VBA.Command$
Close
MsgBox "现在可以拷贝OBJ文件了!", vbInformation
End Sub