Du bist nicht angemeldet.

Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!

Werbeanzeige

Anonymous

unregistriert

1

22.10.2005, 23:50

Include Problem mit SDL und OpenGL

hi, ich will Vertex Buffer Objects verwenden....hab mir nun die extensions geladen und nun das:
ich weiss nicht weiter;-(

lg g

C-/C++-Quelltext

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <gl\glew.h>
#include <stdlib.h>
#include <stdio.h>
#include <SDL.h>
#include <SDL_opengl.h>

#include <gl\gl.h>          // Header File For The OpenGL32 Library

#include <gl\glu.h>         // Header File For The GLu32 Library

#include <gl\glaux.h>       // Header File For The Glaux Library

#include <gl\glext.h>
#pragma comment(lib, "SDLmain.lib")
#pragma comment(lib, "SDL.lib")
#pragma comment(lib, "opengl32.lib")
#pragma comment(lib, "GLu32.lib")    // link glu32.lib

#pragma comment(lib, "glut32.lib")


main.cpp
c:\SDL-1.2.9\include\SDL_opengl.h(4347) : error C2086: 'void (__stdcall *__stdcall PFNGLFRAGMENTLIGHTFVSGIXPROC)(GLenum,GLenum,GLfloat *)' : redefinition
        c:\Programme\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\glew.h(7481) : see declaration of 'PFNGLFRAGMENTLIGHTFVSGIXPROC'
c:\SDL-1.2.9\include\SDL_opengl.h(4349) : error C2086: 'void (__stdcall *__stdcall PFNGLFRAGMENTLIGHTIVSGIXPROC)(GLenum,GLenum,GLint *)' : redefinition
        c:\Programme\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\glew.h(7483) : see declaration of 'PFNGLFRAGMENTLIGHTIVSGIXPROC'
c:\SDL-1.2.9\include\SDL_opengl.h(4351) : error C2086: 'void (__stdcall *__stdcall PFNGLFRAGMENTLIGHTMODELFVSGIXPROC)(GLenum,GLfloat *)' : redefinition
        c:\Programme\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\glew.h(7477) : see declaration of 'PFNGLFRAGMENTLIGHTMODELFVSGIXPROC'
c:\SDL-1.2.9\include\SDL_opengl.h(4353) : error C2086: 'void (__stdcall *__stdcall PFNGLFRAGMENTLIGHTMODELIVSGIXPROC)(GLenum,GLint *)' : redefinition
        c:\Programme\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\glew.h(7479) : see declaration of 'PFNGLFRAGMENTLIGHTMODELIVSGIXPROC'
c:\SDL-1.2.9\include\SDL_opengl.h(4360) : error C2086: 'void (__stdcall *__stdcall PFNGLGETFRAGMENTMATERIALFVSGIXPROC)(GLenum,GLenum,const GLfloat *)' : redefinition
        c:\Programme\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\glew.h(7490) : see declaration of 'PFNGLGETFRAGMENTMATERIALFVSGIXPROC'
c:\SDL-1.2.9\include\SDL_opengl.h(4361) : error C2086: 'void (__stdcall *__stdcall PFNGLGETFRAGMENTMATERIALIVSGIXPROC)(GLenum,GLenum,const GLint *)' : redefinition
        c:\Programme\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\glew.h(7491) : see declaration of 'PFNGLGETFRAGMENTMATERIALIVSGIXPROC'

Anonymous

unregistriert

2

23.10.2005, 00:40

hab nun die #include <SDL_opengl.h> durch die #include <GL/gl.h>
ersetzt und nun hab ich nur mehr diese error:

C-/C++-Quelltext

1
2
3
4
5
Linking...
main.obj : error LNK2001: unresolved external symbol __imp____glewBufferDataARB
main.obj : error LNK2001: unresolved external symbol __imp____glewBindBufferARB
main.obj : error LNK2001: unresolved external symbol __imp____glewGenBuffersARB
Debug/SDL_Sample.exe : fatal error LNK1120: 3 unresolved externals


mitgelinkt hab ich:

C-/C++-Quelltext

1
2
3
4
5
#pragma comment(lib, "SDLmain.lib")
#pragma comment(lib, "SDL.lib")
#pragma comment(lib, "opengl32.lib")
#pragma comment(lib, "GLu32.lib")    // link glu32.lib

#pragma comment(lib, "glut32.lib")


welche lib fehlt mir da?

cu

Anonymous

unregistriert

3

23.10.2005, 02:56

#pragma comment(lib, "glew32.lib") mitlinken vergessen;-)

aber ich versteh trotzdem nicht:
warum muss ich #include <SDL_opengl.h> durch die #include <GL/gl.h> ersetzen? bitte um erkläreung!!!!

cu

Werbeanzeige