我从书上抄了个例子,
VC6下compile完全通过,无警告,错误
但go的时候显示
--------------------Configuration: Cpp1 - Win32 Debug--------------------
Linking...
LINK : warning LNK4098: defaultlib "LIBCMT" conflicts with use of other libs; use /NODEFAULTLIB:library
libcmtd.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Cpp1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.Cpp1.exe - 2 error(s), 1 warning(s)这是什么意思?
(project->setting->c/c++->category->code generation中user run-time library
设为mulithreaded
VC6下compile完全通过,无警告,错误
但go的时候显示
--------------------Configuration: Cpp1 - Win32 Debug--------------------
Linking...
LINK : warning LNK4098: defaultlib "LIBCMT" conflicts with use of other libs; use /NODEFAULTLIB:library
libcmtd.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Cpp1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.Cpp1.exe - 2 error(s), 1 warning(s)这是什么意思?
(project->setting->c/c++->category->code generation中user run-time library
设为mulithreaded
设为mulithreaded
设置为多线程方式
可能程序中用到了_beginthread(),_endthread()函数
如果选择是mulithreaded,应该link的是libcmt.lib,是用于发布Release版本的。
看你的setting中setting for(对话框左上角)是不是Win32 Debug。
若是,将user run-time library设为Debug mulithreaded”
提示是:
Linking...
libcmtd.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Cpp1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.Cpp1.exe - 2 error(s), 0 warning(s)那个_symbol是什么啊?