我全新安装了 Code::Blocks(我安装了 the one for Windows 7 which comes with GCC compiler (codeblocks-10.05mingw-setup.exe))。然后我尝试编译这个非常简单的代码:
int wmain(int argc, wchar_t* argv[])
{
return 0;
}
我收到此错误消息:
c:\development\ide\codeblocks\mingw\bin..\lib\gcc\mingw32\4.4.1......\libmingw32.a(main.o):main.c|| undefined reference to `WinMain@16'| ||=== Build finished: 1 errors, 0 warnings ===|
当我尝试使用 main()
条目运行我的代码时,它按预期运行,没有任何错误或警告。如何在我的代码中使用 wmain()
?我必须做哪些修改?
最佳答案
关于c++ - 如何在 Code::Blocks 中使用 wmain() 入口点?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10932473/