Author Topic: GLest Source 2.0.1 and mingw und Windows?  (Read 4351 times)

Nostromo

  • Guest
GLest Source 2.0.1 and mingw und Windows?
« on: 21 October 2007, 15:18:31 »
Hi,

i'm trying to compile the latest Glest release (glest_source_2.0.1.zip) using Eclipse / CTD and mingw under Windows XP. After reading the VC 2003 tutorial and getting all the additional libraries, i can compile the static library (Glest shared library) but not the game. I get the follwing errors:

1. ../libmingw32.a(main.o):main.c: undefined reference to `WinMain@16'
2. GlestLib\Release/libGlestLib.a(model_renderer_gl.o):model_renderer_gl.cpp: undefined reference to `glActiveTexture@4'
3. GlestLib\Release/libGlestLib.a(model_renderer_gl.o):model_renderer_gl.cpp: undefined reference to `glDrawRangeElements@24'
4.
GlestLib\Release/libGlestLib.a(platform_util.o):platform_util.cpp: undefined reference to `glob(char const*, int, int (*)(char const*, int), glob_t*)'
5.   
GlestLib\Release/libGlestLib.a(platform_util.o):platform_util.cpp: undefined reference to `globfree(glob_t*)'
6.
GlestLib\Release/libGlestLib.a(texture_gl.o):texture_gl.cpp: undefined reference to `glTexImage3D@40'

Right now, i'm using graphics/gl, plattform/sdl and sound/openal from the shared lib (i deleted the other subfolders, like posix, win32, etc) to avoid the trouble to get the directx sdk working under mingw. I link against the following libraries:
GlestLib (which i compiled myself), SDL.dll, SDLmain, opengl32, glu32, xerces-c2_8_0, OpenAL32, vorbisenc, vorbisfile, vorbis, ogg.

Any help would be greatly appreciated.

Background: We are group of twelve students at the university of Dortmund, Germany taking part in a course called "Computational Intelligence in Computer Games". We want to find out if and how CI methods (Neural Networks, Evolutionary Algorithms, etc) can be used to create better / more intelligent Computer Players. Last semester, we programmed new ghosts for a PacMan clone and this semester we want to work with Glest. But to do so, we have to be able to compile the source.

Thanks in advance,
Jan aka Nostromo
« Last Edit: 1 January 1970, 00:00:00 by Nostromo »

hailstone

  • GAE Team
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
(No subject)
« Reply #1 on: 21 October 2007, 22:00:58 »
Hi, welcome to Glest forums.

After a bit of Googling I found you might need to link to the mingw32 library (libmingw32.a) for the first error or run as a console application.

http://dev.eclipse.org/newslists/news.e ... 12121.html
http://forums.codeblocks.org/index.php? ... 374.0;wap2
http://osprey.unisa.ac.za/phorum/read.p ... 5288,35494

The OpenGL error could be related to outdated dll/header files because glActiveTexture() was introduced in OpenGL 1.3 and Windows only has support for OpenGL 1.1 apparently.

http://www.gamedev.net/community/forums ... _id=358499
http://www.bannister.org/forums/ubbthre ... =8&fpart=3
« Last Edit: 1 January 1970, 00:00:00 by hailstone »
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

Nostromo

  • Guest
(No subject)
« Reply #2 on: 23 October 2007, 09:47:47 »
Hi,

Quote from: "hailstone"
After a bit of Googling I found you might need to link to the mingw32 library (libmingw32.a) for the first error or run as a console application.

thank you, that indeed solved this problem.

Quote from: "hailstone"
The OpenGL error could be related to outdated dll/header files because glActiveTexture() was introduced in OpenGL 1.3 and Windows only has support for OpenGL 1.1 apparently.


I am aware of this problem, i have done a lot of development with OpenGL on Windows in the past and have gone through the painful "define your own function pointers and use glGetString(GL_EXTENSIONS) and wglGetProcAddress" a lot of times. It's my impression that Glest uses glprocs.c for all this(?). I downloaded the latest GLSdk from oss.sgi.com (the one linked in the vc2003 tutorial), so guess the header files should be up to date.

Concerning the problem with glob, we solved this by simply copying findAll from win32/plattform_util.cpp (which uses findFirst instead if glob) to sdl/plattform_util. Seems to work.

Can anyone comment on our choice of plattforms (sdl/opengl/openal)? I guess the win32 folder is there for a reason  :D but we get a lot more errors using win32 instead of sdl, so i prefer to keep using the sdl.

Greetings,
Jan
« Last Edit: 1 January 1970, 00:00:00 by Nostromo »