Download Pelles C here: http://www.pellesc.se
//File: game_main.h
#ifndef GAME_MAIN_H
#define GAME_MAIN_H
int GameMain(void);
#endif
//File: main.c
#include "game_main.h"
#include <windows.h>
// Do not include raylib.h because windows.h is included.
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
return GameMain();
}
// File: game_main.c
#include "game_main.h"
#include "raylib.h"
// Do not include windows.h because raylib.h is included.
int GameMain(void)
{
InitWindow(800, 450, "raylib hello");
SetTargetFPS(60);
while (!WindowShouldClose())
{
BeginDrawing();
ClearBackground(RAYWHITE);
DrawText("Hello, raylib!", 190, 200, 40, BLACK);
EndDrawing();
}
CloseWindow();
return 0;
}

#include "raylib.h"
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
InitWindow(800, 450, "raylib hello");
SetTargetFPS(60);
while (!WindowShouldClose())
{
BeginDrawing();
ClearBackground(RAYWHITE);
DrawText("Hello, raylib!", 190, 200, 40, BLACK);
EndDrawing();
}
CloseWindow();
return 0;
}
Building raylibDemo.obj.
E:\PellesC\raylibDemo\raylib.h(260): error #2119: Redeclaration of 'Rectangle', previously declared at E:\PellesC\Include\Win\wingdi.h(3938).
E:\PellesC\raylibDemo\raylib.h(969): error #2119: Redeclaration of 'CloseWindow', previously declared at E:\PellesC\Include\Win\winuser.h(3561).
E:\PellesC\raylibDemo\raylib.h(1019): error #2119: Redeclaration of 'ShowCursor', previously declared at E:\PellesC\Include\Win\winuser.h(6875).
E:\PellesC\raylibDemo\raylib.h(1323): error #2119: Redeclaration of 'LoadImageA', previously declared at E:\PellesC\Include\Win\winuser.h(7950).
E:\PellesC\raylibDemo\raylib.h(1474): error #2119: Redeclaration of 'DrawTextA', previously declared at E:\PellesC\Include\Win\winuser.h(6099).
E:\PellesC\raylibDemo\raylib.h(1475): error #2119: Redeclaration of 'DrawTextExA', previously declared at E:\PellesC\Include\Win\winuser.h(6119).
E:\PellesC\raylibDemo\raylib.h(1649): error #2119: Redeclaration of 'PlaySoundA', previously declared at E:\PellesC\Include\Win\playsoundapi.h(64).
*** Error code: 1 ***
Done.
Page created in 0.070 seconds with 15 queries.