当我尝试在 VC2010 上编译 xll 时出现链接错误
我尝试编译一个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 上进行编译
有人有办法解决我的问题吗?
I try to compile a xll (like a dll but for excel).
i follow this link : http://support.microsoft.com/kb/178474/en-us
when i compile my dll, i have these following errors :
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
i try to use /NODEFAULTLIB
but the result is worse than before i modified it
Here you have my command line :
/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
i try to compile on a Windows seven x64 under visual ultimate 2010
Anyone have an idea to solve my problem plz ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
wvsprintf 已定义在
User32.lib
中,因此您必须链接到此库。来自框架库中的函数:
在您的项目/解决方案中包含
FRAMEWRK.c
或与FRMWRK32.LIB
链接,但不能同时使用两者。wvsprintf is defined in
User32.lib
, so you must link with this library.From Functions in the Framework Library:
Either include
FRAMEWRK.c
in your project/solution or link withFRMWRK32.LIB
, but not both.帮自己一个忙,使用 http://xll.codeplex.com。您将在 2 分钟内启动并运行。
Do yourself a favor and use http://xll.codeplex.com. You will be up and running in 2 minutes.