VOGONS


First post, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

hi,
I downloaded latest sdl 1.2.7 (released a couple of days ago) and on building I get an error in sdlmain.cpp:
make[3]: Entering directory `/e/cvs/dosbox/src/gui'
if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -g -O2 -I/usr/local/cross-tools/i386-mingw32msvc/include/SDL -Dmain=SDL_main -MT sdlmain.o -MD -MP -MF ".deps/sdlmain.Tpo" -c -o sdlmain.o sdlmain.cpp; \
then mv -f ".deps/sdlmain.Tpo" ".deps/sdlmain.Po"; else rm -f ".deps/sdlmain.Tpo"; exit 1; fi
sdlmain.cpp: In function `void GFX_SetSize(unsigned int, unsigned int, unsigned int, double, double, void (*)())':
sdlmain.cpp:335: error: `glPixelDataRangeNV' undeclared (first use this
function)
sdlmain.cpp:335: error: (Each undeclared identifier is reported only once for each function it appears in.)
make[3]: *** [sdlmain.o] Error 1

Reverting to SDL 1.2.6 works.

Building on Windows XP, using Mingw (latest official and latest release candidates, both same error) and Msys.

And using latest Anon-CVS.

(Edit, it is 1.2.7 and 1.2.6 and not 1.27/1.26)

Reply 1 of 3, by bm

User metadata
Rank Newbie
Rank
Newbie

Hi, if you edit /dosbox/src/gui/sdlmain.cpp

add 'PFNWGLFREEMEMORYNVPROC db_glFreeMemoryNV = NULL;' outside of the defines near the start of the file after the includes, and it compiles with SDL 1.2.7 (maybe SDL 1.2.7 defines something?). Also adding more cache for the dynamic comiler makes more games work (albion, at least works =).

Reply 3 of 3, by 2nd.evidence

User metadata
Rank Newbie
Rank
Newbie

I think there is a better way (tho I haven't tested it the previous suggestion, I don't feel like it would solve anything)...

After a quick browse of SDL CVS, it appears that a big update has made it in between 1.2.6 and 1.2.7 in SDL_opengl.h

This makes the definitions redundant and not effective in DosBox's sdlmain.cpp, as GL_NV_pixel_data_range is now defined in SDL.

Well, at least that's what I have understood, and my modification works, for a Win32 build using gcc...

Here is what I did: I removed all the code between

#if C_OPENGL
#include "SDL_opengl.h"

and

#endif //C_OPENGL

Can this be of interest for DosBox devs ?!?
.