-2

我尝试编译一个 xll(像一个 dll,但用于 excel)。

我点击这个链接:http: //support.microsoft.com/kb/178474/en-us

当我编译我的 dll 时,我有以下错误:

1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _debugPrintf already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _GetTempMemory already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _FreeAllTempMemory already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _Excel already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _Excel12f already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _TempNum already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _TempNum12 already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _TempStr already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _TempStrConst already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _TempStr12 already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _TempBool already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _TempBool12 already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _TempInt already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _TempInt12 already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _TempErr already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _TempErr12 already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _TempActiveRef already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _TempActiveRef12 already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _TempActiveCell already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _TempActiveCell12 already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _TempActiveRow already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _TempActiveRow12 already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _TempActiveColumn already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _TempActiveColumn12 already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _TempMissing already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _TempMissing12 already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _InitFramework already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _QuitFramework already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _FreeXLOperT already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _FreeXLOper12T already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _ConvertXLRefToXLRef12 already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _ConvertXLRef12ToXLRef already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _XLOper12ToXLOper already defined in FRAMEWRK.obj
1>frmwrk32.lib(FRAMEWRK.obj) : error LNK2005: _XLOperToXLOper12 already defined in FRAMEWRK.obj
1>Riskedge_Xll.exp : warning LNK4070: /OUT:Riskedge_Xll.xll directive in .EXP differs from output filename 'Riskedge_Xll.dll'; ignoring directive
1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library

我尝试使用/NODEFAULTLIB,但结果比我修改它之前更糟在这里你有我的命令行:

/OUT:"C:\Users\Stagiaire\Documents\Riskedge\Online_pricer\Xll Builder\Debug\Riskedge_Xll.dll"
/INCREMENTAL /NOLOGO 
/LIBPATH:"C:\Users\Stagiaire\Documents\Riskedge\Online_pricer\Xll Builder" 
/DLL "XLCALL32.LIB" "frmwrk32.lib" "User32.lib" /DEF:"C:\Users\Stagiaire\Documents\Riskedge\Online_pricer\Xll Builder\Riskedge_Xll.def" /MANIFEST /ManifestFile:"Debug\Riskedge_Xll.dll.intermediate.manifest"
/ALLOWISOLATION /MANIFESTUAC:"level='asInvoker' uiAccess='false'"
/DEBUG /PDB:"C:\Users\Stagiaire\Documents\Riskedge\Online_pricer\Xll Builder\Debug\Riskedge_Xll.pdb" 
/SUBSYSTEM:WINDOWS /PGD:"C:\Users\Stagiaire\Documents\Riskedge\Online_pricer\Xll Builder\Debug\Riskedge_Xll.pgd" 
/TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:QUEUE 

我尝试在 Visual Ultimate 2010 下的 Windows 7 x64 上编译

有人有想法解决我的问题吗?

4

2 回答 2

1

wvsprintf是在 中定义的User32.lib,所以你必须链接到这个库。

框架库中的函数

要使用框架库函数,您必须在您的 C 代码中包含 FRAMEWRK.H 文件,并将 FRAMEWRK.C 或 FRMWRK32.LIB 文件添加到您的代码项目中。

要么包含FRAMEWRK.c在您的项目/解决方案中,要么与 链接FRMWRK32.LIB,但不能同时包含两者。

于 2012-01-18T11:17:05.587 回答
1

帮自己一个忙,使用http://xll.codeplex.com。您将在 2 分钟内启动并运行。

于 2012-05-27T20:32:43.123 回答