admin管理员组文章数量:1315992
I've inherited an ancient C project that builds an Excel add-in .xll file which works with 32-bit Office, but not 64-bit Office. The project is in a Visual Studio 2022 solution. There are two folders included in the solution which are included as "Additional Library Directories" in the Project's Configuration Properties (the only change I've made is to set the Platform from Win32 to x64. The project compiles with no errors when the Platform is Win32. When I change the platform to x64 and Rebuild, I get the error
LNK1561 entry point must be defined
in file LINK line 1.
Any ideas would be greatly appreciated.
I've inherited an ancient C project that builds an Excel add-in .xll file which works with 32-bit Office, but not 64-bit Office. The project is in a Visual Studio 2022 solution. There are two folders included in the solution which are included as "Additional Library Directories" in the Project's Configuration Properties (the only change I've made is to set the Platform from Win32 to x64. The project compiles with no errors when the Platform is Win32. When I change the platform to x64 and Rebuild, I get the error
LNK1561 entry point must be defined
in file LINK line 1.
Any ideas would be greatly appreciated.
Share Improve this question edited Jan 29 at 23:30 Ken White 126k15 gold badges236 silver badges464 bronze badges asked Jan 29 at 21:46 ValarentiValarenti 3291 gold badge4 silver badges15 bronze badges 5 |1 Answer
Reset to default 1This answer was based on the original question asked, which was then altered by the OP to ask about different issues.
As per error help page from Microsoft:
Linker Tools Error LNK1561
The linker did not find an entry point, the initial function to call in your executable. By default, the linker looks for a main or wmain function for a console app, a WinMain or wWinMain function for a Windows app, or DllMain for a DLL that requires initialization. You can specify another function by using the /ENTRY linker option.
This error can have several causes:
- ...
- You may not have specified the /DLL option when building a DLL.
As XLL Excel add-in is a DLL loaded by Excel, it's worth to ensure that Configuration Type of a project is set to DLL:
本文标签: add inConverting 32bit xll Excel addin to 64 bit LNK1561 errorStack Overflow
版权声明:本文标题:add in - Converting 32-bit xll Excel add-in to 64 bit: LNK1561 error - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741995393a2409937.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
xlAutoOpen
(andxlAutoClose
,xlAutoAdd
,xlAutoRemove
) function, supposed to be exported by XLL, and if they haveXLL_X32
near them try to change toXLL_X64
(found in random XLL 32-bit example on Github – Renat Commented Jan 29 at 23:12xcall**.lib
is specified in Additional Dependencies of linker, and it is in folder specified in Additional Library Directories. Like here: i.sstatic/V0vE5Qnt.png – Renat Commented Jan 29 at 23:26