I made several SDL programs by using DevC++ in Windows. These projects use SDL so should be portable to Linux.

The project exists out of 2 .cpp files, and 1 .h file. In DevC++ you just make a new project, attach these 3 files to it, add a few lines to the project options so that can link SDL with it, you press "compile and run", and it runs and works.

So now I'm trying to build this in linux with KDevelop, but KDevelop looks way too complex. I've already been able to run the "SDL Project" example that you can select in KDevelop when making a new project. Then, I used the "File Browser" to add the 2 .cpp and the .h file of my own project to it, and now, it's nothing but trouble! It gives criptical errors like "exited with status 2" without saying what's actually wrong. Also, where does it actually compile the executable file to?

So, what is the proper way to compile my project?

All I want, is to make an SDL project with my 2 .cpp files and 1 .h file, compile it, and run it. All the code in these files should be platform independent and uses SDL + standard C++ code. How do I do this?


EDIT: I also saw it giving an error: "main.cpp:295: error: invalid initialization of non-const reference of type 'Uint8&' from a temporary of type 'Uint8". Note that it compiles perfeclty in DevC++, which uses the gnu compiler as well! What's going on here??