From 5d522f3f8ef0ab77a6e008145bee0f779ce9ce12 Mon Sep 17 00:00:00 2001 From: Colesnicov Denis Petrovich Date: Thu, 2 May 2024 22:33:12 +0200 Subject: [PATCH] Added eclipse setup section for linux. --- Use-raylib-with-Eclipse.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/Use-raylib-with-Eclipse.md b/Use-raylib-with-Eclipse.md index f43cca3..0a8038b 100644 --- a/Use-raylib-with-Eclipse.md +++ b/Use-raylib-with-Eclipse.md @@ -27,7 +27,7 @@ You can follow one of this guides for building **raylib** on your operative syst * https://github.com/raysan5/raylib/wiki/Working-on-macOS * https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux -### Creating a new C/C++ Project +### Creating a new C/C++ Project on Windows * Run **Eclipse IDE for C/C++**. * From the main menu choose **File > New > C/C++ Project**. @@ -35,18 +35,36 @@ You can follow one of this guides for building **raylib** on your operative syst * Write the **Project name** then select **Hello World C++ Project** and **MinGW CC** under **Toolchains**. * Click on **Finish** to create the new project. +### Creating a new C/C++ Project on Linux (GCC) + +* Run **Eclipse IDE for C/C++**. +* From the main menu choose **File > New > C/C++ Project**. +* Select **C++ Managed Build** and **Next >**. +* Write the **Project name** then select **Hello World C++ Project** and **Linux GCC** under **Toolchains**. +* Click on **Finish** to create the new project. + Now you can replace the contents of the main **.cpp** file with some basic examples from the following link: https://www.raylib.com/examples.html -### Configuring the Project for raylib +### Configuring the Project for raylib on Windows * From the main menu choose **Project > Properties**. * Now go to **C/C++ Build > Settings > Tool Settings** tab. -* Under **GCC C++ Compiler > Includes > Include paths (-I)** add the path to your **raylib/src** folder. +* Under **MinGW C++ Compiler > Includes > Include paths (-I)** add the path to your **raylib/src** folder. * Under **MinGW C++ Linker > Libraries > Libraries (-l)** add **raylib**, **opengl32**, **gdi32**, and **winmm** libs. * Under **MinGW C++ Linker > Libraries > Library search path (-L)** add the path to the **raylib** static library which you previously built. + +### Configuring the Project for raylib on Linux (GCC) + +* From the main menu choose **Project > Properties**. +* Now go to **C/C++ Build > Settings > Tool Settings** tab. +* Under **GCC C Compiler > Includes > Include paths (-I)** add the path to your **raylib/src** folder. +* Under **GCC C++ Compiler > Includes > Include paths (-I)** add the path to your **raylib/src** folder. +* Under **GCC C++ Linker > Libraries > Libraries (-l)** add **raylib**, OpenGL version you are using, for example: **GLESv2**, And other libraries... +* Under **GCC C++ Linker > Libraries > Library search path (-L)** add the path to the **raylib** static library which you previously built. + ### Build and Run! * Under the tab **Project Explorer** (you find on the left side of the screen) right click on your project.