Cross-compiling an SDL based program under Ubuntu Linux

Started by
13 comments, last by jmakitalo 13 years, 3 months ago
Thank you very much zurn and all. I was able to cross-compile SDL-OpenGL app. I might want to switch
DevIL -> SDL_image if there is nothing too bad about the latter.

I would not like to give up GLEW, since it automagically provides the function pointers, which really makes life easy.
If I have understood correctly, SDL also has cross-plaform extension loader, but you have to get the pointers by hand.
GLEW does distribute the lib:s, dll:s and headers, so do you suppose that these could be used directly to cross-compile?
Advertisement
@jmakitalo:

Why don't you reduce dependencies? If you are going for cross compilation stuff, may I suggest you to get rid of DevIL, Freetype and FTGL? Textures and Fonts might be optimized for crossplatform by creating your own format and loader to it. You would reduce a huge number of dependencies by doing so.

GLEW is highly recommended for crossplataform OGL as it will easen the burden of GL checks.

Firstly, MSVC++ costs

You can grab Microsoft Visual C++ 2010 Express for free; if you're a student, you can grab the professional version for free through Dreamspark or through your school's MSDNAA account. (The differences in features between Express and Professional are unnoticeable.) So, Visual Studio is basically free.


I've learned that the MSVC++ is loose with C++ standards, so I do not give
much faith to it
True. However, you can also grab a copy of MinGW to double check your code for cross compilation.

@jmakitalo:

Why don't you reduce dependencies? If you are going for cross compilation stuff, may I suggest you to get rid of DevIL, Freetype and FTGL? Textures and Fonts might be optimized for crossplatform by creating your own format and loader to it. You would reduce a huge number of dependencies by doing so.

GLEW is highly recommended for crossplataform OGL as it will easen the burden of GL checks.



Yes, I started reducing dependencies. I got rid of libconfig++ as this stuff is easy to write. Also I got rid of DevIL and tried to use
SDL_image, but got into trouble. The compiler says that it cannot find IMG_Init, Img_Quit, IMG_INIT_JPG, IMG_INIT_PNG.

This is weird and frustrating, since the SDL_image.h and SDLimage.lib are contained in the packet that follows from
http://icculus.org/~dolson/sdl/ .

I managed to cross compile FTGL and TrueType2 by following http://www.pitt.edu/~mwr12/compcorner/linuxstuff/ftgl.html .


GLEW has makefiles for Mingw, but when I try to compile my source that includes glew.h, it gives a lot of errors about undefined
types involving "64" in the name.
I was able to compile all source files after including SDL_opengl.h before gl.h.

Though now I get linker errors about undefined reference to basically all
opengl functions and SDL functions.

This topic is closed to new replies.

Advertisement