我有一个工作的Visual Studio项目,它使用wmain()作为入口点。 我想用main()来代替。
如果我简单地将函数签名更改为int main() ,我会得到:
错误LNK2019:无法解析的外部符号_wmain在函数中引用“void __cdecl mainCRTStartupHelper(struct HINSTANCE__ *,unsigned short const *)”
我需要更改哪些选项才能使链接成功?
I have a working Visual Studio project that uses wmain() as the entry-point. I would like to use main() instead.
If I simply change the function signature to int main(), I get:
error LNK2019: unresolved external symbol _wmain referenced in function "void __cdecl mainCRTStartupHelper(struct HINSTANCE__ *,unsigned short const *)"
What option do I need to change to make the link succeed?
最满意答案
我通过猜测发现了一个解决方案。
Configuration Properties > Linker > Advanced > Entry Point
是: mainWCRTStartup
现在: mainCRTStartup ##已删除W
构建成功。
I found a solution by guessing.
Configuration Properties > Linker > Advanced > Entry Point
was: mainWCRTStartup
now: mainCRTStartup ## removed W
Build succeeded.
更多推荐
发布评论