c++.command-line - libc
- Ryan <Ryan_member pathlink.com> May 14 2004
- "Walter" <newshound digitalmars.com> May 14 2004
I'm trying to eliminate the libc runtime from my executable. I don't use any functions from it as I use win32 api alternatives. The command line option that I need seems to be -NL. As expected, I get a linker error about __acrtused. I figured that some non-libc startup code must still be in snn.lib so I included that as a library, but then I get this C:\dm\lib\snn.lib(constart) Error 42: Symbol Undefined _main C:\dm\lib\snn.lib(wconstar) Error 42: Symbol Undefined _wmain C:\dm\lib\snn.lib(wwinstar) Error 42: Symbol Undefined _wWinMain 16 I'm not sure why it would be trying to import all of those. I use WinMain as the start function, and am using the following dmc -c -mn -WA -NL helloworld.c link /NOI /DE /XN /NT /ENTRY:WinMainCRTStartup /A:512 /L/exet:nt/su:windows helloworld.obj kernel32.lib user32.lib snn.lib
May 14 2004
This might be helpful: www.digitalmars.com/ctg/acrtused.html "Ryan" <Ryan_member pathlink.com> wrote in message news:c8254k$2rpc$1 digitaldaemon.com...I'm trying to eliminate the libc runtime from my executable. I don't use
functions from it as I use win32 api alternatives. The command line option
I need seems to be -NL. As expected, I get a linker error about
figured that some non-libc startup code must still be in snn.lib so I
that as a library, but then I get this C:\dm\lib\snn.lib(constart) Error 42: Symbol Undefined _main C:\dm\lib\snn.lib(wconstar) Error 42: Symbol Undefined _wmain C:\dm\lib\snn.lib(wwinstar) Error 42: Symbol Undefined _wWinMain 16 I'm not sure why it would be trying to import all of those. I use WinMain
start function, and am using the following dmc -c -mn -WA -NL helloworld.c link /NOI /DE /XN /NT /ENTRY:WinMainCRTStartup /A:512
helloworld.obj kernel32.lib user32.lib snn.lib
May 14 2004








"Walter" <newshound digitalmars.com>