Unfortunately, now I have problems compiling the code with CodeBlocks on Windoze.You won't be able to switch from VC compiler to MinGW/GCC compiler without (heavy) modifications and probably even the need of 3rd party libs I guess. But why don't you just use the VC compiler with C::B?
I can now compile, execute, debug my engine with CodeBlocks on Linux.If I read right, he managed to compile the same code on linux, so I think it should be possible to fix it for MinGW, too.
You very likely clicked on "Have g++ follow the 1998 C++ standard". This enables strict ANSI mode in which it isn't allowed to use non-standard C names such as the ones defined in <sys/types.h>.No, I did not click that option, and in fact cannot find it in any CodeBlocks dialog (maybe I need to find that dialog?). I did see an option that outputs -ansi compiler switch, but I do not have that checked either (though I tried it at one point).
Solution: either write compliant C++ or do not tell the compiler to treat your code as such.
MinGW: A collection of freely available and freely distributable Windows specific header files and import libraries, augmenting the GNU Compiler Collection, (GCC), and its associated tools, (GNU binutils). MinGW provides a complete Open Source programming tool set which is suitable for the development of native Windows programs that do not depend on any 3rd-party C runtime DLLs.
data = (u08*) _aligned_malloc (bytes, 16);Are you aware that these prototypes are within an ifdef statement:
/* These require msvcr70.dll or higher. */
#if __MSVCRT_VERSION__ >= 0x0700
[...]
#endif
Eh, no, I didn't notice that, but you raise a question.
My code compiles and runs the way it is on VisualStudio2005. Roughly how many "extra" #defines (that I don't have now and don't need in VS) am I likely to need to add? And, do they belong in the #define tab in the IDE, or in my code somewhere?
__MSVCRT_VERSION__=0x0700
Compiling: icemathasm.s
mingw32-g++.exe: =: No such file or directory
mingw32-g++.exe: 0x0700: No such file or directory
...
The final line of those 3 error lines is also suspicious. I just added the __MSVCRT_VERSION__ = 0x0700 to the #define tab in the IDE, and that error contains 0x0700. Not sure why it would consider 0x0700 (or anything under the #define tab) a "file or directory", but that 0x0700 value is awfully suspicious. The strange thing is, adding that line stopped the error on the _aligned_malloc() function, so off hand it seemed to work as intended.