link了几个自己的lib后成这样了。
LINK : warning LNK4075: ignoring /EDITANDCONTINUE due to /INCREMENTAL:NO specification
LIBC.lib(crt0dat.obj) : warning LNK4006: __cinit already defined in libcmt.lib(crt0dat.obj); second definition ignoredLINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library
Release/a.exe : warning LNK4088: image being generated due to /FORCE option; image may not run
LIBC.LIB和libcmt.lib不都是VC自己的吗?
LINK : warning LNK4075: ignoring /EDITANDCONTINUE due to /INCREMENTAL:NO specification
LIBC.lib(crt0dat.obj) : warning LNK4006: __cinit already defined in libcmt.lib(crt0dat.obj); second definition ignoredLINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library
Release/a.exe : warning LNK4088: image being generated due to /FORCE option; image may not run
LIBC.LIB和libcmt.lib不都是VC自己的吗?
#pragma comment(link, "/NODEFAULTLIB:LIBC.lib")
或者检查一下编译的 /MT(/MTd) 标志是不是和 /ML(/MLd) 标志冲突了。
to In355Hz:
1)我最早的错误是LIBC.lib(crt0dat.obj) : error LNK2005: __cinit already defined in libcmt.lib(crt0dat.obj);
是error,程序编译不过。问题原因同GunRoses说的一样。
加上#pragma comment(linker,"/FORCE:MULTIPLE")后,编译通过了。
error变成warning了。
LIBC.lib(crt0dat.obj) : warning LNK4006: __cinit already defined in libcmt.lib(crt0dat.obj); second definition ignored**加上#pragma comment(linker, "/NODEFAULTLIB:LIBC.lib")
不行,因为我调用的lib中有用到LIBC.lib中的定义,例如_errno
2)LINK : warning LNK4075: ignoring /EDITANDCONTINUE due to /INCREMENTAL:NO specification**修改 Project Settings, 添加 Link Incrementally(Link)后
这个提示没了,但是多了个
Release/Znykt.exe : warning LNK4071: cannot be incrementally linked on subsequent links笨笨的问:去掉 Program Database for Edit and Continue(C/C++)
在哪里去掉啊?请继续帮忙!
但是很奇怪。Debug版本不能达到预期的效果,Release可以。不知道和这有没有关系。还是说,和我链接的lib有关。