mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
Updated Working on Windows (markdown)
@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
## Building Raylib on Windows
|
||||
## Building raylib on Windows
|
||||
|
||||
There are several ways to get setup on Windows. This page will go through them from the easiest to the most difficult.
|
||||
|
||||
@ -16,11 +16,11 @@ This is an open source C/C++ toolchain that is very lightweight. The best way to
|
||||
https://github.com/skeeto/w64devkit/
|
||||
Download the w64devkit zip file, unzip it and run W64Devkit.exe. that will give you a terminal that is ready to go.
|
||||
|
||||
*Note* that old MinGW (Not w64) from mingw.org will not work with Raylib. You need to use MinGW-w64.
|
||||
*Note* that old MinGW (Not w64) from mingw.org will not work with raylib. You need to use MinGW-w64.
|
||||
|
||||
*MSYS2 Note* We do not recommend using MSYS2 to get GCC, even though several tutorials suggest it. It can be difficult to configure properly and does not always include all the things needed for a complete development system. The W64-Devkit is a much better way to get the needed toolchain for building games with Raylib.
|
||||
*MSYS2 Note* We do not recommend using MSYS2 to get GCC, even though several tutorials suggest it. It can be difficult to configure properly and does not always include all the things needed for a complete development system. The W64-Devkit is a much better way to get the needed toolchain for building games with raylib.
|
||||
|
||||
## Raylib-Quickstart, the simple solution to get started quickly.
|
||||
## raylib-quickstart, the simple solution to get started quickly.
|
||||
The quickstart is a cross platform template for all desktop platforms that will setup raylib automatically.
|
||||
|
||||
https://github.com/raylib-extras/raylib-quickstart
|
||||
@ -31,7 +31,7 @@ Simply follow the instructions in that link and you will be done, you do not nee
|
||||
## Compile using Zig tools (cross platform)
|
||||
This guide should work across all platforms, but the example is demonstrated on Windows.
|
||||
|
||||
1. Download and unzip Raylib to a directory, e.g., `C:\raylib`.
|
||||
1. Download and unzip raylib to a directory, e.g., `C:\raylib`.
|
||||
2. Place your C file in any desired location.
|
||||
3. Compile the C (i.e., test.c) file using the following command:
|
||||
`zig cc -o test.exe test.c -I"C:\raylib\include" "C:\raylib\lib\libraylib.a" -lopengl32 -lgdi32 -lwinmm`
|
||||
@ -58,7 +58,7 @@ If you do not want to use the quickstart, you have several options
|
||||
int main() {
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 600;
|
||||
InitWindow(screenWidth, screenHeight, "Raylib basic window");
|
||||
InitWindow(screenWidth, screenHeight, "raylib basic window");
|
||||
SetTargetFPS(60);
|
||||
while (!WindowShouldClose()) {
|
||||
BeginDrawing();
|
||||
@ -85,7 +85,7 @@ Using MinGW make tool, just navigate from command line to `raylib/src/` folder a
|
||||
|
||||
### Installing and building raylib via vcpkg
|
||||
|
||||
You can download and install Raylib using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:
|
||||
You can download and install raylib using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:
|
||||
|
||||
git clone https://github.com/Microsoft/vcpkg.git
|
||||
cd vcpkg
|
||||
@ -106,7 +106,7 @@ The instructions below are focused on compiling raylib using Notepad++ as the ed
|
||||
Just open `raylib/src/raylib.h` source file on Notepad++ and execute (F6) the script `raylib_source_compile`
|
||||
|
||||
## A note on dependencies
|
||||
Raylib includes all of it's own external dependencies on windows. There are only 2 system libraries that need to be linked to raylib for a game to work.
|
||||
raylib includes all of it's own external dependencies on windows. There are only 2 system libraries that need to be linked to raylib for a game to work.
|
||||
|
||||
* GDI32: This is the interface to the window setup and drawing functions that raylib and GLFW need to work on Windows.
|
||||
* WinMM: This is contains the high resolution timer code used by GLFW for precise timing in the game loop.
|
||||
|
||||
Reference in New Issue
Block a user