vc2010 express中的MINIMAL .exe项目设置 [英] project settings in vc2010 express for a MINIMAL .exe
问题描述
我已经从vs2002迁移到了vc2010express.
我曾经能够为一个简单的c ++应用程序编译一个MINIMAL .exe.
现在我的.exe需要msvcr100.dll :(
我不使用任何c运行时函数.
我不需要异常处理或SEH.
没什么!
我为链接器和...定义了一个自定义入口点.
I''ve migrated from vs2002 to vc2010express.
I used to be able to compile a MINIMAL .exe for a simple c++ app.
Now my .exe needs msvcr100.dll :(
I don''t use ANY c runtime funcs.
I don''t want exception handling or SEH.
No NOTHIN!
I''ve defined a custom entry point for linker and...
void *operator new (unsigned int sz)
{ void *p;
p = (void *) ::HeapAlloc (::GetProcessHeap (), 0, sz ? sz : 1);
if (p == NULL) Die ("outa memory!");
return p;
}
void operator delete (void *p) {if (p) ::HeapFree (::GetProcessHeap (), 0, p);}
我已尽力调整了设置,但似乎无法使链接器不需要msvcr100.dll :(
是否有人可以与我共享一个最小类型的.vcxproj文件,或者是一些设置C编译器和链接器设置的想法?
或只是一些提示?
Pleeeeeeeease :)
... Steve
I''ve tweaked the settings best I can, but can''t seem to get the linker to not need msvcr100.dll :(
Does anybody have a minimal type .vcxproj file they could share with me or ideas to set c compiler, linker settings to?
Or just some tips?
Pleeeeeeeease :)
...Steve
推荐答案
我想您必须使用/NODEFAULTLIB
链接器开关.但是然后您必须为应用程序设置入口点,请参见下面的MSDN
页[ ^ ].
:)
I suppose you have to use the/NODEFAULTLIB
linker switch. But then you''ve to set an entry point for your application, see the followingMSDN
page [^].
:)
如果我错了,请纠正我,但这不是运行事件所需的C运行时库最基本的"Hello World"程序吗?
Correct me if I am wrong, but is this not the C runtime library that is required to run event the most basic "Hello World" program?
这篇关于vc2010 express中的MINIMAL .exe项目设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!