AReichl wrote:I don't want to hijack this thread, but ...
With MinGW-TDM example 16 Quake 3 Map Shader would not link ( problem with snprintf ).
On the other side example 21 Quake 3 Explorer ( which also uses snprintf ) compiles and links fine.
I found if i put
#include "driverChoice.h"
ABOVE !!!
#include <irrlicht.h>
it works.
But still - this and other problems with other libraries ( Irrklang, Bullet, Boost, POCO, ... ) i don't have with the distribution i use.
I can't reproduce the error you mentioned, at least with the latest SVN version 4898, trunk.
I used a fresh SVN checkout, and just opened up the existing workspace in the examples folder.
I had no global switches or special settings sent to the compiler, linker, or anything else, just used out-of-the-box MinGW TDM 4.8.1-3 download, everything default all across the board. (TDM MinGW, by default, will include needed libraries in a static fashion, c++ as well as anything else used, another reason I recommend it to people new to MinGW. Because I didn't add any command-line switches in this case, this also means that "-m64" is implied by default, so in my quick test I'm actually building 64-bit binaries and a 64-bit Irrlicht DLL, but I still wanted to test with everything out-of-the-box and no special configuration set.)
- Irrlicht DLL built just fine, lots of warnings about trying to build without RTTI when compiling the C files for the dependencies, but those are no big deal. I chose "Win32 - accurate math - release - DLL" No errors.
- Built and ran the first four examples, choosing "Windows" for the target of course. No errors, the examples ran just fine.
- Built and ran both examples 16 and 21 you mentioned, both built and ran just fine. No errors, didn't have the issues you mentioned, didn't touch the source code.
- Built the tech demo project. Compiled and linked just fine, just a warning about an unrecognized #pragma statement meant for MSVC compilers (which is no big deal, shouldn't hurt the program). Ran it, no errors. The runtime log did spit out a warning about how an image texture had to be resized, because the source was in oddball dimensions, uneven and not power-of-two, so it made it 128x128, but still used it.
Again, this is with everything out-of-the-box, as if I had just installed everything and didn't change the global compiler settings, didn't add any switches or change any options in C::B. I also didn't touch the irrCompileConfig.h header.
I'm not sure where your problems are coming from, I don't know why you are having a different result.
I admit I didn't do this with the latest official release download from SourceForge, just the most recent SVN checkout. As such, it is possible there may have been some bugs that were fixed since the last release that made the difference in this case.
EDIT: I also didn't try this test with the shader-pipeline branch - Is that what you're using?
EDIT (2): Perhaps we should have another thread for this, one where we discuss Irrlicht with various versions of MinGW and talk about trying to figure out why / how some people are getting inconsistent results.