当我尝试在 VC2010 上编译 xll 时出现链接错误

发布于 2024-12-27 18:19:32 字数 4636 浏览 3 评论 0原文

我尝试编译一个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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

伤感在游骋 2025-01-03 18:19:32

wvsprintf 已定义在 User32.lib 中,因此您必须链接到此库。

来自框架库中的函数

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

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

wvsprintf is defined in User32.lib, so you must link with this library.

From Functions in the Framework Library:

To use the Framework library functions, you must include the FRAMEWRK.H file in your C code and add the FRAMEWRK.C or FRMWRK32.LIB files to your code project.

Either include FRAMEWRK.c in your project/solution or link with FRMWRK32.LIB, but not both.

淤浪 2025-01-03 18:19:32

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

Do yourself a favor and use http://xll.codeplex.com. You will be up and running in 2 minutes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文