這里以《深入淺出MFC》中的hello程序為例。
1、創(chuàng)建一個General的空項目。
2、將后綴為.RC、.H、.CPP、.ICO的文件copy到新建目錄下。
3、將這些文件添加到project中去。
4、在Project-〉Properties-〉ConfigurationProperties-〉Linker-〉System-〉Subsystem中選擇Windows(/Subsystem:Windows)。(如果這里沒有修改會產(chǎn)生這樣的錯誤:Error?1?error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup?libcmt.lib?,所有程序包括window、console等等都是從_tmainCRTStartup函數(shù)啟動的,源代碼可見……\Microsoft Visual Studio 8\VC\crt\src\crt0.c Line94,程序不同_tmainCRTStartup的定義也不同。)
如果你想設(shè)斷點調(diào)試的話,在C/C++-〉General-〉DebugInformationFormat中選擇ProgramDatabase(/zi)