www.digitalmars.com [Home] [Search] [Contents]

Acrtused

__acrtused is an external reference generated by the compiler to bring in the startup code appropriate to a console application, a Windows application, a DLL, or a WINC application. Different __acrtused names are referenced to bring in different startup code.

Programmers occasionally run into various problems with _acrtused names being multiply defined or being undefined. Essentially, _acrtused is an external reference generated by the compiler in order to bring in the startup code appropriate to a console app, a windows app, a dll app, etc. Different acrtused names are referenced to bring in different startup code. The variations are:

__acrtused      If WinMain()
			-or-
		If 16 or 32 bit DOS compile and main()

__acrtused_winc If 16 bit Windows compile and main()

__acrtused_dll  If 16 bit Windows compile and LibMain()
			-or-
		If -mn and LibMain()
			-or-
		If -mn and DllMain()

__acrtused_con  If -mn and main()

__wacrtused_con If -mn and wmain()

__wacrtused     If -mn and wWinMain()
Notes:

Troubleshooting problems with startup code at link time