A bug in XPSP2: the makefile.gen is:
# A simple makefile generator by KiSoft, 2007. mailto: kisoft@rambler.ru
# version: 0.3.11.12
# Project Variables start
CPP=cl.exe
CC=cl.exe
LD=link.exe
LIB=link.exe
WINDRES=rc.exe
# Project Variables end
# Target: Release
OBJS_RELEASE=D:\ycdeng\~temp\ga\Release\main.obj D:\ycdeng\~temp\ga\Release\resource.res D:\ycdeng\~temp\ga\Release\app.obj
Release: D:\ycdeng\~temp\ga\Release\ga.exe
D:\ycdeng\~temp\ga\Release\ga.exe: $(OBJS_RELEASE)
@echo Building executable D:\ycdeng\~temp\ga\Release\ga.exe
@link.exe /nologo /subsystem:windows /LIBPATH:Z:\cbvc\wx\lib\vc_lib /LIBPATH:Z:\cbvc\psdk\lib /LIBPATH:Z:\cbvc\lib\atl /LIBPATH:Z:\cbvc\lib /LIBPATH:"C:\Program Files\Microsoft Visual Studio 8\VC\lib" /out:D:\ycdeng\~temp\ga\Release\ga.exe wxmsw28u_core.lib wxbase28u.lib wxpng.lib wxzlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comctl32.lib wsock32.lib odbc32.lib winmm.lib rpcrt4.lib $(Release) /OPT:REF /OPT:ICF /IGNORE:4089 /INCREMENTAL:NO /SUBSYSTEM:WINDOWS
D:\ycdeng\~temp\ga\Release\main.obj: main.cpp
@echo Compiling: main.cpp
@cl.exe /nologo /DWIN32 /D__WIN32__ /D__WXMSW__ /DwxUSE_UNICODE /D_UNICODE /DUNICODE /D_WINDOWS /TP /Gd /GF /EHsc /Fd"D:\ycdeng\~temp\ga\Release\\vc.pdb" /W3 /Ox /DNDEBUG /MT /O2 /EHsc /Fd"D:\ycdeng\~temp\ga\Release\\vc.pdb" /DWIN32 /D__WIN32__ /D__WXMSW__ /DwxUSE_UNICODE /D_UNICODE /DUNICODE /D_WINDOWS /IZ:\cbvc\wx\include /IZ:\cbvc\wx\lib\vc_lib\mswu /IZ:\cbvc\psdk\include /IZ:\cbvc\include\atl /IZ:\cbvc\include /I"C:\Program Files\Microsoft Visual Studio 8\VC\include" /c main.cpp /FoD:\ycdeng\~temp\ga\Release\main.obj
D:\ycdeng\~temp\ga\Release\resource.res: resource.rc
@echo Compiling: resource.rc
@rc.exe /IZ:\cbvc\wx\include /IZ:\cbvc\wx\lib\vc_lib\mswu /IZ:\cbvc\psdk\include /IZ:\cbvc\include /I"C:\Program Files\Microsoft Visual Studio 8\VC\include" -foD:\ycdeng\~temp\ga\Release\resource.res resource.rc
D:\ycdeng\~temp\ga\Release\app.obj: app.cpp
@echo Compiling: app.cpp
@cl.exe /nologo /DWIN32 /D__WIN32__ /D__WXMSW__ /DwxUSE_UNICODE /D_UNICODE /DUNICODE /D_WINDOWS /TP /Gd /GF /EHsc /Fd"D:\ycdeng\~temp\ga\Release\\vc.pdb" /W3 /Ox /DNDEBUG /MT /O2 /EHsc /Fd"D:\ycdeng\~temp\ga\Release\\vc.pdb" /DWIN32 /D__WIN32__ /D__WXMSW__ /DwxUSE_UNICODE /D_UNICODE /DUNICODE /D_WINDOWS /IZ:\cbvc\wx\include /IZ:\cbvc\wx\lib\vc_lib\mswu /IZ:\cbvc\psdk\include /IZ:\cbvc\include\atl /IZ:\cbvc\include /I"C:\Program Files\Microsoft Visual Studio 8\VC\include" /c app.cpp /FoD:\ycdeng\~temp\ga\Release\app.obj
.PHONY: clean_Release
clean_Release:
@echo Delete $(OBJS_RELEASE) D:\ycdeng\~temp\ga\Release\ga.exe
-@del /f $(OBJS_RELEASE) D:\ycdeng\~temp\ga\Release\ga.exe
When D:\ycdeng\~temp\ga\Release is not exist, nmake will fail.
nmake Makefile.gen found link error, but CB work fine.
Compiling: main.cpp
main.cpp
Compiling: resource.rc
Compiling: app.cpp
app.cpp
Building executable D:\ycdeng\~temp\ga\Release\ga.exe
LINK : warning LNK4001: no object files specified; libraries used
LINK : warning LNK4068: /MACHINE not specified; defaulting to X86
LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
D:\ycdeng\~temp\ga\Release\ga.exe : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: 'link.exe' : return code '0x460'
Stop.