I’m using SDL and I’m trying to make things work with the microsoft
compiler.
All compiles and links well under linux (using gcc), but on my
winXP PC (using the MS compiler/linker) I get this:
MSVCRTD.lib(secchk.obj) : warning LNK4210: .CRT section exists; there may be
unhandled static initializers or terminators
Things seem to work ok when I run my app, but I’d still like to resolve this
because it sounds a bit scary that all statics in secchk could get
mangled…
In case it helps, here are my compiler and linker flags:
sorry dunno what your problems with the MS compiler are from though :P> ----- Original Message -----
From: kos@climaxgroup.com (Kostas Kostiadis)
To: "A list for developers using the SDL library. (includes SDL-announce)"
Sent: Friday, December 17, 2004 10:59 AM
Subject: [SDL] MS linker warning…
Hello all,
I’m using SDL and I’m trying to make things work with the microsoft
compiler.
All compiles and links well under linux (using gcc), but on my
winXP PC (using the MS compiler/linker) I get this:
MSVCRTD.lib(secchk.obj) : warning LNK4210: .CRT section exists; there may
be
unhandled static initializers or terminators
Things seem to work ok when I run my app, but I’d still like to resolve
this
because it sounds a bit scary that all statics in secchk could get
mangled…
In case it helps, here are my compiler and linker flags:
I am…That’s what the /MD (or /MDd) option does.
If you look at my original warning:
MSVCRTD.lib(secchk.obj) : warning LNK4210: .CRT section exists; there may be
unhandled static initializers or terminators
you’ll see that the warning comes from MSVCRTD.lib…
I have no idea how to get rid of it…
If anyone knows, pls do tell…
The problem is that for this to work, CRT init code needs
to run…But because I have to pass /ENTRY:SDL_main, the
app doesn’t call the CRT init stuff (I think crtMainStartup is
what win expects…)