5

I know this question has popped up before but I could not find a good answer so I try here.

I have a pure C dll (Win32) and I get this warning when compiling:

MSVCRTD.lib(cpu_disp.obj) : warning LNK4210: .CRT section exists; there may be unhandled static initializers or terminators

Everything seems to work just fine but I am concerned about this warning since I do not understad it. I have quite a few static variables but I do not understand what ".CRT section exist" means.

What approach should I take to eliminate this warning. When I try to add the libs msdn suggests I get a ton of linker errors.

4

2 回答 2

3

我也有这个问题;正如在此处提出问题时所指出的那样,问题是 /ENTRY:"main" 给出了此错误;删除该参数可以修复警告。

于 2011-05-25T03:22:54.010 回答
0

我通过删除/NOENTRY链接器选项解决了这个错误。

于 2014-01-12T10:15:45.023 回答