Presentation is loading. Please wait.

Presentation is loading. Please wait.

code::blocks 與GLUT 程式開發

Similar presentations


Presentation on theme: "code::blocks 與GLUT 程式開發"— Presentation transcript:

1 code::blocks 與GLUT 程式開發
Ming-Te Chi Department of Computer Science  National Chengchi University 2016

2 Outline Code blocks下載及安裝 Glut bin file下載及配置 創立一個glut範例程式

3 Code::Blocks下載 下載網址

4 點選Download

5 點選 ”Download the binary release”

6 請依所使用之OS作下載 (在此僅以windows 系統做示範教學)
兩個選一個安裝即可

7 安裝Code Blocks 若選 codeblocks-16.01mingw-nosetup.zip 直接解壓縮即可,跳過這些步驟

8 依造內定

9 選擇安裝位置 PC教室的系統還原

10 執行Code Blocks

11 Glut bin file下載及配置 下載網址

12 Do the following! After you download and open the GLUT bin zip file
Copy glut32.dll to  c:\windows\system32 or c:\windows\SysWOW (win 64) Copy glut32.lib to  C:\Program Files (x86)\CodeBlocks\MinGW\lib Copy glut.h to  C:\Program Files (x86)\CodeBlocks\MinGW\include\GL These are default locations, your paths may be different. But basically, you place the .lib and .h files in the location of your compiler (in this case mingw). The .dll file goes in the windows system directory. *在此放置 .lib .h檔案時必須依照code blocks所安裝的路徑,若code blocks安裝於D:\program files\Code Blocks則就必須放置於D:\program files\mingw\lib依此類推 綠色區替換成你安裝codeblocks的目錄

13 創立一個glut範例程式 File -> New -> Project

14 選擇GLUT 為project命名

15 指定路徑至MinGW 直接按下Finish

16 add at line 14: #include <windows.h>

17 按下 (F9) to Build and run 試著按下“+”、 “ –”,並觀察其執行狀況與code的撰寫方式

18 參考教學網址: Mac使用glut可參考


Download ppt "code::blocks 與GLUT 程式開發"

Similar presentations


Ads by Google