SDL usage to create a Linux executable

I have compiled and linked my code written in C and C++ and calling certain Windows APIs to a Win32 .exe using SDL and MinGW in Code::Blocks runnings on Windows XP. How do I use Code::Blocks and SDL to compile and link to create a Linux executable, please? I can run Code::Blocks on either Windows XP or Ubuntu Linux.

Thanks

Finston

If you have Linux installed just go there, honestly (cross-compilers
are painful :P). It should be pretty much the same as on Windows, just
that you don’t link SDL_main (actually with MinGW you don’t even need
it either…).

tl;dr build SDL on Linux, make sure to run ldconfig (or reboot >_>)
and then just go into Code::Blocks and build as usual.

Though, the above is for SDL only. You mention using the Windows API.
What is it for? You’ll have to replace those in the source code before
it can build (e.g. by using the preprocessor or using different files
for the Linux build). This is outside the scope of SDL though.

2013/4/16, Finston :> I have compiled and linked my code written in C and C++ and calling certain

Windows APIs to a Win32 .exe using SDL and MinGW in Code::Blocks runnings on
Windows XP. How do I use Code::Blocks and SDL to compile and link to create
a Linux executable, please? I can run Code::Blocks on either Windows XP or
Ubuntu Linux.

Thanks

Finston