From 182887eec3949d511429a91bbfa4d68c1eae685a Mon Sep 17 00:00:00 2001 From: "Amine B. Hassouna" Date: Sun, 28 Oct 2018 18:54:03 +0100 Subject: [PATCH] Add Eclipse instructions --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index c333428..fb8d9b5 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,35 @@ Run Code::Blocks, and open the project in `basic-c-sdl-project/build/codeblocks` Finally, build and run the project. +#### Open with Eclipse C/C++ + +[Eclipse][] is a well-known IDE, widely used in Java projects development, but +it also supports other programming languages, like in this case C/C++. +It handle CMake projects by wrapping them into native Eclipse projects. + +*Download Eclipse C/C++:* + +Online installer: https://www.eclipse.org/downloads
+Offline package: https://www.eclipse.org/downloads/packages + +*Prepare the Eclipse project:* + +```sh +# Create a folder for the Eclipse project outside this project +cd basic-c-sdl-project +mkdir ../eclipse-basic-c-sdl-project +cd ../eclipse-basic-c-sdl-project + +# Generate an Eclipse project +cmake ../basic-c-sdl-project -G "Eclipse CDT4 - Unix Makefiles" +``` +*Open the project:*
+Run Eclipse, and open the project in `eclipse-basic-c-sdl-project`.
+Create a new run configuration: Go to `Run` > `Run configurations` > +`C\C++ Application` and specify the C/C++ Application using `Search Project...`
+Finally, build and run the project. + + ## License This project is distributed under the terms of the MIT license @@ -114,3 +143,4 @@ This project is distributed under the terms of the MIT license [SDL2_gfx]: http://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx [Qt Creator]: https://doc.qt.io/qtcreator [Code::Blocks]: http://www.codeblocks.org +[Eclipse]: https://www.eclipse.org