[feature-requests:#1586] SciTE: change win32 main function to wWinMain
Status: open
Group: Initial
Labels: SciTE win32
Created: Thu May 28, 2026 10:19 AM UTC by Zufu Liu
Last Updated: Thu May 28, 2026 10:19 AM UTC
Owner: Neil Hodgson
This makes SciTE.exe 1KB smaller (probably due to CRT startup code don't need to convert command line argument from wide to narrow).
- int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)
+ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE, LPWSTR, int)
Sent from sourceforge.net because scintill...@googlegroups.com is subscribed to https://sourceforge.net/p/scintilla/feature-requests/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/scintilla/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.
That didn't work with MinGW-w64.
C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-crtexewin.o): in function `main':
E:\temp\gcc\build-mingw-w64\mingw-w64-crt/../../src/mingw-w64-crt/crt/crtexewin.c:70:(.text.startup+0xbd): undefined reference to `WinMain'
collect2.exe: error: ld returned 1 exit status
mingw32-make: *** [makefile:184: ../bin/SciTE.exe] Error 1
win32\makefile needs LDFLAGS += -mwindows -municode.
[feature-requests:#1586] SciTE: change win32 main function to wWinMain
Status: open
Group: Initial
Labels: SciTE win32
Created: Thu May 28, 2026 10:19 AM UTC by Zufu Liu
Last Updated: Fri May 29, 2026 11:06 PM UTC
Owner: Neil Hodgson
Committed as [ad12ac].
[feature-requests:#1586] SciTE: change win32 main function to wWinMain
Status: open
Group: Committed
Labels: SciTE win32
Created: Thu May 28, 2026 10:19 AM UTC by Zufu Liu
Last Updated: Sat May 30, 2026 10:31 AM UTC
Owner: Neil Hodgson