25 5月 2010

SOP to Create Sample Programs of ICG

照著自己規劃的進度, 緩慢的進行ICG Study...
一段時間只唸內容文字,剛剛要Create Appendix A的Sample Program to Trace Code,
竟忘了最簡單的SOP, 有點Shock, 果然生疏不得
為避免將時間浪費在重複的錯誤中 寫一篇簡單的SOP給將來的自己

Target: Interactive Computer Graphics, A top-down approach with OpenGL (Forth Edition)
  1. Pre-set VS2005 Environment for GLUT.
  2. Create a Win32 Console App.
  3. In Wizard:
    Application Type-->Console Application
    Additional Options-->"Precompiled Header"
  4. After generating a buildable project, 將project_name.cpp的內容, 除了最上方的
    #include "stdafx.h"外,
    都用
    Angel's source codes to override.
  5. 最後視情況加上一些function需要include的library,
    例如:rand()需要額外增加 "#include <>stdlib.h
    "在#include "stdafx.h"下方
  6. 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.

沒有留言:

張貼留言