שימוש בopengl עם Dev-C++

matanzur

New member
שימוש בopengl עם Dev-C++

אולי מישהו יודע איך אני יכול להשתמש בopengl עם devC++ כי כשניסיתי היתה בהתחלה הודעת שגיאה- c:\t.f.s\3dman\untitled1.c: In function `BOOL CreateGLWindow(char *, int, int, int, bool)´: c:\t.f.s\3dman\untitled1.c:150: `CDS_FULLSCREEN´ undeclared (first use this function) c:\t.f.s\3dman\untitled1.c:150: (Each undeclared identifier is reported only once c:\t.f.s\3dman\untitled1.c:150: for each function it appears in.) אז כתבתי: #define CDS_FULLSCREEN 4 והיתה הודעת שגיאה: c:\t.f.s\3dman\untitled1.o(.text+0x854):untitled1.c: undefined reference to `ChoosePixelFormat@8´ c:\t.f.s\3dman\untitled1.o(.text+0x898):untitled1.c: undefined reference to `SetPixelFormat@12´ c:\t.f.s\3dman\untitled1.o(.text+0xc2f):untitled1.c: undefined reference to `SwapBuffers@4´ מישהוא יכול לעזור? בתודה נועם
 

galh

New member
נסיון...

תבדוק שאתה עושה include לקובץ gl.h ועושה link ל- OPENGL32.LIB. בכל מקרה להגדיר את CDS_FULLLSCREEN לבד זה לא פתרון.
 

matanzur

New member
תודה על העצות

הצלחתי לקמפייל בסופו של דבר (הייתי צריך להוסיף ללינקר -lgdi32) ולמרות זאת לפי מה שיראיתי באינטרנט כן צריכים להגדיר: #ifndef CDS_FULLSCREEN #define CDS_FULLSCREEN 4 #endif וזה אכן עזר לי,בכל מקרה תודה.
 
למעלה