You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Sorry, something makes no sense again.
When I told you to manually add: "#define swprintf swprintf_s" below the includes you got a new error that swprintf_s is not declared. So that obviously meant that this define which is also in irrTypes.h was not compiled there. But when checking now every single define which could prevent that from being compiled every one of them is correct. Which means it must be compiled.
I'm really running out of ideas - either that define does not work (then we would check your includes next) or it is not even compiled (but then one of the defines must be broken).
Hm ok - lets try what VS thinks you have: Go over "swprintf" in your main.cpp, right-click it and select "go to declaration". In which file and on which line will that bring you?
My guess is it will bring you to some define - then check again the same for the define - for example if there is swprintf_s then check for that. If VS offers you more than one solution (resolve ambiguity) then please write down all of them - again the the linenumber and the file (including path if possible, that can be somewhat telling in this case).
Ok, so it is using the right define in irrTypes.h - no idea why you get different results by putting the same define again in the .cpp file, but out of ideas about that now. Just kick it out again from q3factory.cpp (I thought it was in main anyway.. but also doesn't matter anymore).
When you right-click the tab-name (stdio.h) in VS you can do "Copy full path" to find out which stdio.h is used in case you have more than one on your system and it finds the wrong one. The correct one should have a path similar to "Microsoft Visual Studio 9.0\VC\include\stdio.h".
Also when you are over stdio.h line 465 and you go over __STDC_WANT_SECURE_LIB__ - does it show you that it has values 1?
Lastly when did you get the swprintf.inl files? I don't get those when looking for "go to declaration" - which is the first time our systems seem to have some difference. Please also check the path of those. Because that one in line 85 is the wrong one which should not be used.
edit: also something simple I forgot asking: Which build-target are you using? I'm on Debug - Win32 so far - maybe it only happens with another one.
Yeah, I have the file - I just don't get an .inl file when going to declarations. That's why I'm wondering when you are getting that.
But I have no more ideas... from all I can see so far it is using the correct function-declaration - the one with a size_t as second parameter (size_t is an integer). But then you would not get the error. And that you get it with codeblocks as well is even more confusing.
Well - not really if it uses wrong function declaration. The problem is that it seems to use the correct one in VS (and I have VS here as well and it works) and you still get an error. And even more confusing me now is that I can no longer compile examples in Codeblocks - not even for old versions. And not even a game where I used the same which was developed in Codeblocks on Windows... but I can't remember when I last changed anything on MinGW. But definitely not working with current MinGW it seems.
No, the problem here is that driverChoice.h does include iostream (which it shouldn't in Irrlicht) which resets the swprintf and breaks it.
But in this case it does work here the way I wrote first - adding "#define swprintf swprintf_s" after the includes. Then I can compile in C::B as well.
Don't know yet why iostream does mess with this - maybe I find a way to prevent that (would surprise me if I never used those in combination).
Well, the driver choice was deliberately written with iostream - after all it was always that way in the examples. But it shouldn't be included in irrlicht.h