DLL导出函数错点错
def文件; PrinterDll.def : Declares the module parameters for the DLL.
LIBRARY "PrinterDll"
DESCRIPTION 'PrinterDll Windows Dynamic Link Library'
EXPORTS
Init @1
CheckPrinter @2
WarningCheck @3
CheckPrinterTotalNum @4
PrintImage @5
.h文件:
_declspec(dllexport) int Init();
_declspec(dllexport) int CheckPrinter();
_declspec(dllexport) int WarningCheck ();
_declspec(dllexport) int CheckPrinterTotalNum();
_declspec(dllexport) int PrintImage(char* str,int paperNum);
.cpp
_declspec(dllexport) int CheckPrinter(){}
_declspec(dllexport) int WarningCheck (){}
_declspec(dllexport) int CheckPrinterTotalNum(){}
_declspec(dllexport) int PrintImage(char* str,int paperNum){}
错误:
Linking...
.\PrinterDll.def : warning LNK4022: cannot find unique match for symbol "Init"
.\PrinterDll.def : warning LNK4002: "public: int __thiscall PrinterFun::Init(void)" (?Init@PrinterFun@@QAEHXZ) defined in .\Debug\PrinterFun.obj
.\PrinterDll.def : warning LNK4002: "protected: void __thiscall CString::Init(void)" (?Init@CString@@IAEXXZ) defined in C:\Program Files\Microsoft Visual Studio\VC98\MFC\LIB\mfc42d.lib
LINK : fatal error LNK1152: cannot resolve one or more undecorated symbols
LINK : fatal error LNK1141: failure during build of exports file
Error executing link.exe.
PrinterDll.dll - 2 error(s), 3 warning(s)
麻烦具体告诉下如何导出函数,导出类就不要说了,我会,现在我就是导出函数然后做个COM接口去调用
麻烦详细告诉下如何导出函数,COM里又该如何调用他