วิธีการใช้ GLUT บน MAC ด้วย Eclipse

 - by NAzT

With Eclipse On Mac

ก่อนอื่นเราต้องใช้ (Use This)

#include <OpenGL/gl.h> #include <GLUT/glut.h>
แทนที่จะใช้ (Instead Of)
#include <GL/gl.h> #include <GL/glut.h>
แล้ว
  1. คลิกขวาที่ ด้านซ้ายมือ
  2. เลือก Properties
  3. เลือก  “C/C++ Build:Properties”
  4. มองหาและไปที่ “Tool Settings”
  5. เลือกไปที่ “Mac OS X C++ Linker : Miscellaneous”
  6. เพิ่มใช่ช่อง “Linker flags” field: ด้วย -framework GLUT -framework OpenGL

    English Version.
        
    1. Right-click on your Project’s icon in the “Project Explorer” pane.
    2. Choose “Properties” from the context menu
    3. Choose “C/C++ Build:Properties” from the dialog box tree view.
    4. Choose “Tool Settings” from the tab list
    5. Choose “Mac OS X C++ Linker : Miscellaneous”
    6. Add the following text to the “Linker flags” field:
    -framework GLUT -framework OpenGL        

    Picture 3

    Related Blogs

    เรื่องที่เกี่ยวข้อง