Skip to main content
GameDev.net gamedev.net
🔒 Locked

Glew makes problem (mingw/eclipse/libsdl)

Started by mede Nov 18, 2009 at 6:29 PM 2 replies 3.2k views
Original Post
mede
mede
Hey folks I have decided to put my OpenGL project from Visual Studio to eclipse. because i like to compile it also for macos and linux. i did: - installed eclipse CDT - installed mingw - installed libsdl to mingw - installed msys until here i had no problems ... i could compile and run the basic code to create a OpenGL window. but then i came to the extended functions like glActiveTexture for which i use Glew. then everything get worse ;( i tryed now for hours to bring this shit to work. i have readed the first 5 tabs of google pages related to this thema without any solution !!! NEED HELP !!! i did then: - downloaded glew sources - changed makefile GLEW_DEST ?= c:/mingw/ - make - make install so i get the libglew32.dll.a and libglew32.a in the mingw lib folder then i added GLEW_STATIC to the preprocessor defines and added -lglew32 in the eclipse compile properties of my project NOW when i include anywhere in my code i get the ERROR C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/SDL/SDL_opengl.h:4855: error: conflicting declaration 'typedef void (*PFNGLFRAGMENTLIGHTFVSGIXPROC)(GLenum, GLenum, const GLfloat*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/GL/glew.h:9573: error: 'PFNGLFRAGMENTLIGHTFVSGIXPROC' has a previous declaration as typedef void (*PFNGLFRAGMENTLIGHTFVSGIXPROC)(GLenum, GLenum, GLfloat*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/SDL/SDL_opengl.h:4855: error: declaration of typedef void (*PFNGLFRAGMENTLIGHTFVSGIXPROC)(GLenum, GLenum, const GLfloat*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/GL/glew.h:9573: error: conflicts with previous declaration typedef void (*PFNGLFRAGMENTLIGHTFVSGIXPROC)(GLenum, GLenum, GLfloat*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/SDL/SDL_opengl.h:4855: error: declaration of typedef void (*PFNGLFRAGMENTLIGHTFVSGIXPROC)(GLenum, GLenum, const GLfloat*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/GL/glew.h:9573: error: conflicts with previous declaration typedef void (*PFNGLFRAGMENTLIGHTFVSGIXPROC)(GLenum, GLenum, GLfloat*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/SDL/SDL_opengl.h:4857: error: conflicting declaration 'typedef void (*PFNGLFRAGMENTLIGHTIVSGIXPROC)(GLenum, GLenum, const GLint*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/GL/glew.h:9575: error: 'PFNGLFRAGMENTLIGHTIVSGIXPROC' has a previous declaration as typedef void (*PFNGLFRAGMENTLIGHTIVSGIXPROC)(GLenum, GLenum, GLint*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/SDL/SDL_opengl.h:4857: error: declaration of typedef void (*PFNGLFRAGMENTLIGHTIVSGIXPROC)(GLenum, GLenum, const GLint*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/GL/glew.h:9575: error: conflicts with previous declaration typedef void (*PFNGLFRAGMENTLIGHTIVSGIXPROC)(GLenum, GLenum, GLint*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/SDL/SDL_opengl.h:4857: error: declaration of typedef void (*PFNGLFRAGMENTLIGHTIVSGIXPROC)(GLenum, GLenum, const GLint*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/GL/glew.h:9575: error: conflicts with previous declaration typedef void (*PFNGLFRAGMENTLIGHTIVSGIXPROC)(GLenum, GLenum, GLint*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/SDL/SDL_opengl.h:4859: error: conflicting declaration 'typedef void (*PFNGLFRAGMENTLIGHTMODELFVSGIXPROC)(GLenum, const GLfloat*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/GL/glew.h:9569: error: 'PFNGLFRAGMENTLIGHTMODELFVSGIXPROC' has a previous declaration as typedef void (*PFNGLFRAGMENTLIGHTMODELFVSGIXPROC)(GLenum, GLfloat*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/SDL/SDL_opengl.h:4859: error: declaration of typedef void (*PFNGLFRAGMENTLIGHTMODELFVSGIXPROC)(GLenum, const GLfloat*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/GL/glew.h:9569: error: conflicts with previous declaration typedef void (*PFNGLFRAGMENTLIGHTMODELFVSGIXPROC)(GLenum, GLfloat*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/SDL/SDL_opengl.h:4859: error: declaration of typedef void (*PFNGLFRAGMENTLIGHTMODELFVSGIXPROC)(GLenum, const GLfloat*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/GL/glew.h:9569: error: conflicts with previous declaration typedef void (*PFNGLFRAGMENTLIGHTMODELFVSGIXPROC)(GLenum, GLfloat*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/SDL/SDL_opengl.h:4861: error: conflicting declaration 'typedef void (*PFNGLFRAGMENTLIGHTMODELIVSGIXPROC)(GLenum, const GLint*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/GL/glew.h:9571: error: 'PFNGLFRAGMENTLIGHTMODELIVSGIXPROC' has a previous declaration as typedef void (*PFNGLFRAGMENTLIGHTMODELIVSGIXPROC)(GLenum, GLint*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/SDL/SDL_opengl.h:4861: error: declaration of typedef void (*PFNGLFRAGMENTLIGHTMODELIVSGIXPROC)(GLenum, const GLint*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/GL/glew.h:9571: error: conflicts with previous declaration typedef void (*PFNGLFRAGMENTLIGHTMODELIVSGIXPROC)(GLenum, GLint*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/SDL/SDL_opengl.h:4861: error: declaration of typedef void (*PFNGLFRAGMENTLIGHTMODELIVSGIXPROC)(GLenum, const GLint*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/GL/glew.h:9571: error: conflicts with previous declaration typedef void (*PFNGLFRAGMENTLIGHTMODELIVSGIXPROC)(GLenum, GLint*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/SDL/SDL_opengl.h:4868: error: conflicting declaration 'typedef void (*PFNGLGETFRAGMENTMATERIALFVSGIXPROC)(GLenum, GLenum, GLfloat*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/GL/glew.h:9582: error: 'PFNGLGETFRAGMENTMATERIALFVSGIXPROC' has a previous declaration as typedef void (*PFNGLGETFRAGMENTMATERIALFVSGIXPROC)(GLenum, GLenum, const GLfloat*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/SDL/SDL_opengl.h:4868: error: declaration of typedef void (*PFNGLGETFRAGMENTMATERIALFVSGIXPROC)(GLenum, GLenum, GLfloat*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/GL/glew.h:9582: error: conflicts with previous declaration typedef void (*PFNGLGETFRAGMENTMATERIALFVSGIXPROC)(GLenum, GLenum, const GLfloat*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/SDL/SDL_opengl.h:4868: error: declaration of typedef void (*PFNGLGETFRAGMENTMATERIALFVSGIXPROC)(GLenum, GLenum, GLfloat*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/GL/glew.h:9582: error: conflicts with previous declaration typedef void (*PFNGLGETFRAGMENTMATERIALFVSGIXPROC)(GLenum, GLenum, const GLfloat*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/SDL/SDL_opengl.h:4869: error: conflicting declaration 'typedef void (*PFNGLGETFRAGMENTMATERIALIVSGIXPROC)(GLenum, GLenum, GLint*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/GL/glew.h:9583: error: 'PFNGLGETFRAGMENTMATERIALIVSGIXPROC' has a previous declaration as typedef void (*PFNGLGETFRAGMENTMATERIALIVSGIXPROC)(GLenum, GLenum, const GLint*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/SDL/SDL_opengl.h:4869: error: declaration of typedef void (*PFNGLGETFRAGMENTMATERIALIVSGIXPROC)(GLenum, GLenum, GLint*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/GL/glew.h:9583: error: conflicts with previous declaration typedef void (*PFNGLGETFRAGMENTMATERIALIVSGIXPROC)(GLenum, GLenum, const GLint*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/SDL/SDL_opengl.h:4869: error: declaration of typedef void (*PFNGLGETFRAGMENTMATERIALIVSGIXPROC)(GLenum, GLenum, GLint*)' C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/GL/glew.h:9583: error: conflicts with previous declaration typedef void (*PFNGLGETFRAGMENTMATERIALIVSGIXPROC)(GLenum, GLenum, const GLint*)' Build error occurred, build is stopped Time consumed: 2609 ms. has ANYONE a GOOD idea
mede
mede
i took glew.h and glew.o into my project now i can compile.

but i am unable to get the GLEW BINARYS to my macbook !!!!!

i tried:

---to download sources from from page:
http://glew.sourceforge.net/
all version... i got every time unable to expand - broken pipe

---get glew with macport
$ sudo port install glew
Command output: sh: line 1: -xf: command not found

gzip: stdout: Broken pipe

Error: Status 1 encountered during processing.

---in fink i couldend found the package fink

HOW I CAN BRING THIS PACKAGE TO MY MACBOOK
mac os 10.4.11 (intel)

samuraicrow
samuraicrow
You should consider installing GLEW from source on Mac. Using the MacPorts and Fink installers would require the X-Server to be installed in order to get the GLX version. I think you want the version of GLEW that uses MacOSX's internal OpenGL drivers instead.

If you've got a broken pipe, then maybe you need to reinstall MacOSX since the pipe comes with that as does gzip.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.