Is there any way I can explicitly in my code call the functions that are normally called in mainCRTStartup functions? I'm specifically interested initterm and initterm_e functions. Even thought my program is linked with crt (it has to be, right?) I couldn't just call initterm - I tried to declare and just invoke and I got undefined reference.
Is there any way to do it?
the _initterm, and _initterm_e (note in msdn
_initterm_eis wrong declared - really it used_PIFVtype) is exported by different CRT dlls. and it declared in lib files too. and implementation of this functions is very simply:so you can import it ot use own implementation. here faster question - what is use as input parameters ?
say c++ (CL compiler how minimum) use
( ".CRT$XCA", ".CRT$XCZ" )sections for place c++ global initializes. so we can do next:but here need very good understand - what and why we doing