Linker issues

This commit is contained in:
2026-05-12 15:00:20 -05:00
parent af802505ec
commit edc49c57fb
2 changed files with 5 additions and 4 deletions

View File

@@ -21,11 +21,12 @@ ifeq ($(OS), Windows_NT)
PLATFORM := win32
PLATFORM_SRCS := $(wildcard $(SRC)/win32_*.c)
PLATFORM_OBJS := $(patsubst $(SRC)/%.c, $(OBJ)/%.o, $(PLATFORM_SRCS))
PLATFORM_FLAGS := -D WIN32 -DUNICODE -D_UNICODE
PLATFORM_LIBS :=
PLATFORM_FLAGS := -DWIN32 -DUNICODE -D_UNICODE
PLATFORM_LIBS := -municode -mconsole
ifeq ($(CI2_GUI),1)
PLATFORM_LIBS += -mwindows
PLATFORM_LIBS -= -mconsole
PLATFORM_FLAGS += -DCI2_GUI
endif

View File

@@ -25,7 +25,7 @@ SOFTWARE.
int WINAPI ci2_wWinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
PWSTR pCmdLine,
LPSTR pCmdLine,
int nCmdShow) {
// Create a console so stdout/stderr work
UNUSED(hPrevInstance);
@@ -71,7 +71,7 @@ int WINAPI ci2_wWinMain(
}
int WINAPI ci2_wmain(int argc, ci2_sys_char *wargv[]) {
// You already have a console because this is a console subsystem binary.
wprintf(L"Console present. argc=%d\n", argc);
UNUSED(wargv);
HINSTANCE hInst = GetModuleHandleW(NULL);