一段時間只唸內容文字,剛剛要Create Appendix A的Sample Program to Trace Code,
竟忘了最簡單的SOP, 有點Shock, 果然生疏不得
為避免將時間浪費在重複的錯誤中 寫一篇簡單的SOP給將來的自己
為避免將時間浪費在重複的錯誤中 寫一篇簡單的SOP給將來的自己
Target: Interactive Computer Graphics, A top-down approach with OpenGL (Forth Edition)
- Pre-set VS2005 Environment for GLUT.
- Create a Win32 Console App.
- In Wizard:
Application Type-->Console Application
Additional Options-->"Precompiled Header" - After generating a buildable project, 將project_name.cpp的內容, 除了最上方的
#include "stdafx.h"外,
都用Angel's source codes to override. - 最後視情況加上一些function需要include的library,
例如:rand()需要額外增加 "#include <>stdlib.h"在#include "stdafx.h"下方 - If no error when you build the solution, the sample program is Ready.
Let's trace codes.
[補充] : 要use Angel's c file直接取代default的"int _tmain(int argc, _TCHAR* argv[])", 要記得在Project Setting裡面, 指定Unicode Character Set.