update code::blocks example to support linux
This commit is contained in:
parent
ae7127232d
commit
0fc58a06f2
|
|
@ -1,16 +1,17 @@
|
||||||
# raylib for Code::Blocks
|
# Raylib template for Code::Blocks
|
||||||
**by D3nX**
|
|
||||||
<br/>
|
1. Install Raylib. On Windows you must install the 'Windows Installer (with MinGW compiler)' package. On other
|
||||||
Hey! Here it is a project template to use with `Code::Blocks` =)
|
platforms you can install however you like.
|
||||||
<br/><br/>
|
|
||||||
First, you need to download the [raylib installer](https://www.raylib.com) and run it. It will install raylib with the compiler.
|
2. Windows only: In Code::Blocks, select `Settings` `Compiler` `Toolchain executables`.
|
||||||
<br/><br/>
|
Change `Compiler's instrallation directory` to `C:\raylib\MingGW`. Do *not* press auto-detect. There is a screenshot
|
||||||
Then, download the template, and open the project with `Code::Blocks`.
|
below showing how it should look. Press `OK`.
|
||||||
|
|
||||||
|
3. Select `File` `Open` and open the `core_basic_windows.cbp` file.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Before running the template, make sure following set the raylib compiler for the IDE as show below:
|
|
||||||
<br>
|
|
||||||

|

|
||||||
<br/>
|
**by D3nX**
|
||||||
Finally, you can run the program and enjoy raylib running on `Code::Blocks`!
|
|
||||||
<br /><br />
|
See also https://github.com/electronstudio/raylib-game-template-codeblocks
|
||||||
Hope it helped you =)
|
|
||||||
|
|
@ -1,12 +1,8 @@
|
||||||
/*******************************************************************************************-lraylib -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm
|
/*******************************************************************************************
|
||||||
*
|
|
||||||
* raylib [core] example - Basic window
|
* raylib [core] example - Basic window
|
||||||
*
|
*
|
||||||
* Welcome to raylib!
|
* Welcome to raylib!
|
||||||
*
|
*
|
||||||
* To test examples, just press F6 and execute raylib_compile_execute script
|
|
||||||
* Note that compiled executable is placed in the same folder as .c file
|
|
||||||
*
|
|
||||||
* You can find all basic examples on C:\raylib\raylib\examples folder or
|
* You can find all basic examples on C:\raylib\raylib\examples folder or
|
||||||
* raylib official webpage: www.raylib.com
|
* raylib official webpage: www.raylib.com
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -2,51 +2,97 @@
|
||||||
<CodeBlocks_project_file>
|
<CodeBlocks_project_file>
|
||||||
<FileVersion major="1" minor="6" />
|
<FileVersion major="1" minor="6" />
|
||||||
<Project>
|
<Project>
|
||||||
<Option title="core_basic_window" />
|
<Option title="raylib-game-template" />
|
||||||
|
<Option execution_dir="." />
|
||||||
<Option pch_mode="2" />
|
<Option pch_mode="2" />
|
||||||
<Option compiler="gcc" />
|
<Option compiler="gcc" />
|
||||||
<Build>
|
<Build>
|
||||||
<Target title="Debug">
|
<Target title="Debug">
|
||||||
<Option output="bin/Debug/core_basic_window" prefix_auto="1" extension_auto="1" />
|
<Option platforms="Unix;Mac;" />
|
||||||
|
<Option output="bin/Debug/raylib-game-template" prefix_auto="1" extension_auto="1" />
|
||||||
|
<Option working_dir="." />
|
||||||
<Option object_output="obj/Debug/" />
|
<Option object_output="obj/Debug/" />
|
||||||
<Option type="1" />
|
<Option type="1" />
|
||||||
<Option compiler="gcc" />
|
<Option compiler="gcc" />
|
||||||
<Compiler>
|
<Compiler>
|
||||||
<Add option="-g" />
|
<Add option="-g" />
|
||||||
<Add directory="../../src" />
|
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add option="-lraylib -lopengl32 -lgdi32 -lwinmm" />
|
<Add library="raylib" />
|
||||||
<Add library="../../src/libraylib.a" />
|
<Add library="GL" />
|
||||||
|
<Add library="m" />
|
||||||
|
<Add library="pthread" />
|
||||||
|
<Add library="dl" />
|
||||||
|
<Add library="rt" />
|
||||||
|
<Add library="X11" />
|
||||||
</Linker>
|
</Linker>
|
||||||
</Target>
|
</Target>
|
||||||
<Target title="Release">
|
<Target title="Release">
|
||||||
<Option output="bin/Release/core_basic_window" prefix_auto="1" extension_auto="1" />
|
<Option platforms="Unix;Mac;" />
|
||||||
|
<Option output="bin/Release/raylib-game-template" prefix_auto="1" extension_auto="1" />
|
||||||
|
<Option working_dir="." />
|
||||||
<Option object_output="obj/Release/" />
|
<Option object_output="obj/Release/" />
|
||||||
<Option type="1" />
|
<Option type="1" />
|
||||||
<Option compiler="gcc" />
|
<Option compiler="gcc" />
|
||||||
<Compiler>
|
<Compiler>
|
||||||
<Add option="-O2" />
|
<Add option="-O2" />
|
||||||
<Add directory="../../src" />
|
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
<Add option="-s" />
|
<Add option="-s" />
|
||||||
<Add option="-lraylib -lopengl32 -lgdi32 -lwinmm" />
|
<Add library="raylib" />
|
||||||
<Add library="../../src/libraylib.a" />
|
<Add library="GL" />
|
||||||
|
<Add library="m" />
|
||||||
|
<Add library="pthread" />
|
||||||
|
<Add library="dl" />
|
||||||
|
<Add library="rt" />
|
||||||
|
<Add library="X11" />
|
||||||
|
</Linker>
|
||||||
|
</Target>
|
||||||
|
<Target title="Debug (windows)">
|
||||||
|
<Option platforms="Windows;" />
|
||||||
|
<Option output="bin/Debug/raylib-game-template" prefix_auto="1" extension_auto="1" />
|
||||||
|
<Option working_dir="." />
|
||||||
|
<Option object_output="obj/Debug/" />
|
||||||
|
<Option type="1" />
|
||||||
|
<Option compiler="gcc" />
|
||||||
|
<Compiler>
|
||||||
|
<Add option="-g" />
|
||||||
|
</Compiler>
|
||||||
|
<Linker>
|
||||||
|
<Add library="raylib" />
|
||||||
|
<Add library="opengl32" />
|
||||||
|
<Add library="gdi32" />
|
||||||
|
<Add library="winmm" />
|
||||||
|
<Add option="-static" />
|
||||||
|
<Add library="pthread" />
|
||||||
|
</Linker>
|
||||||
|
</Target>
|
||||||
|
<Target title="Release (windows)">
|
||||||
|
<Option platforms="Windows;" />
|
||||||
|
<Option output="bin/Release/raylib-game-template" prefix_auto="1" extension_auto="1" />
|
||||||
|
<Option working_dir="." />
|
||||||
|
<Option object_output="obj/Release/" />
|
||||||
|
<Option type="1" />
|
||||||
|
<Option compiler="gcc" />
|
||||||
|
<Compiler>
|
||||||
|
<Add option="-O2" />
|
||||||
|
</Compiler>
|
||||||
|
<Linker>
|
||||||
|
<Add option="-s" />
|
||||||
|
<Add library="raylib" />
|
||||||
|
<Add library="opengl32" />
|
||||||
|
<Add library="gdi32" />
|
||||||
|
<Add library="winmm" />
|
||||||
|
<Add option="-static" />
|
||||||
|
<Add library="pthread" />
|
||||||
</Linker>
|
</Linker>
|
||||||
</Target>
|
</Target>
|
||||||
</Build>
|
</Build>
|
||||||
<Compiler>
|
<Compiler>
|
||||||
<Add option="-Wall -std=c99" />
|
<Add option="-Wall" />
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Unit filename="core_basic_window.c">
|
<Unit filename="core_basic_window.c">
|
||||||
<Option compilerVar="CC" />
|
<Option compilerVar="CC" />
|
||||||
</Unit>
|
</Unit>
|
||||||
<Extensions>
|
|
||||||
<code_completion />
|
|
||||||
<envvars />
|
|
||||||
<debugger />
|
|
||||||
<lib_finder disable_auto="1" />
|
|
||||||
</Extensions>
|
|
||||||
</Project>
|
</Project>
|
||||||
</CodeBlocks_project_file>
|
</CodeBlocks_project_file>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user