raysan5 / raylib

A simple and easy-to-use library to enjoy videogames programming
http://www.raylib.com
zlib License
22.65k stars 2.27k forks source link

Raylib not executing!!! #564

Closed mattackerplus closed 6 years ago

mattackerplus commented 6 years ago

Please help!!!

I really love this library because I'm a fan of C, and I've been making a game in it for the past 2 weeks. I had to reset my computer recently because of a little problem and when I tried to run the project I was working on it refused at first giving the exit code concerned with an outdated gpu i sorted that out then when i tried to run it after fixing that little problem it gave me yet another with the exit code 255.

It just plain refuses to execute the file, please do help me for I love using raylib and if you need anymore info please do say so.

Oh yeah Raysan is awesome and I really appreciate everything he has done.

raysan5 commented 6 years ago

ok, what is your GPU? how did you sort that issue? what version of raylib are you using? did you tried with core_basic_window.c example? could you paste the command line output?

mattackerplus commented 6 years ago

I solved that problem using https://github.com/raysan5/raylib/wiki/FAQ, and I'm using a intel g33, I've always been using it and my raylib is 1.8, yes I did try it but no luck and here's the output:

> Setup required Environment
-------------------------------------
SET: RAYLIB_DIR = C:\raylib
$(RAYLIB_DIR) = C:\raylib
ENV_SET: PATH=C:\raylib\MinGW\bin
$(SYS.PATH) = C:\raylib\MinGW\bin
CD: C:\raylib\raylib\examples\core
Current directory: C:\raylib\raylib\examples\core

NOTE: raylib uses OpenAL Soft library compiled statically and linked into the executable

> Cleaning latest build
---------------------------
cmd /c IF EXIST core_basic_window.exe del /F core_basic_window.exe
Process started >>>
<<< Process finished. (Exit code 0)

> Compiling program
-------------------------
gcc -o core_basic_window.exe core_basic_window.c -s C:\raylib\raylib\raylib_icon -Iexternal -lraylib -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm -std=c99 -Wl,-allow-multiple-definition -Wl,--subsystem,windows
Process started >>>
<<< Process finished. (Exit code 0)

> Reset Environment
--------------------------
ENV_UNSET: PATH
$(SYS.PATH) has been restored

> Executing program
-------------------------
cmd /c IF EXIST core_basic_window.exe core_basic_window.exe
Process started >>>
<<< Process finished. (Exit code 255)
================ READY ================

Thanks for the swift response!

raysan5 commented 6 years ago

Sorry, I need the output console info of the program executing. Try removing -Wl,--subsystem,windows parameter from compilation and execute core_basic_window.exe from command line.

mattackerplus commented 6 years ago

Just seems to crash after I do that,sorry I believe I'm failing to properly follow instructions.

raysan5 commented 6 years ago

On this compilation line:

gcc -o core_basic_window.exe core_basic_window.c -s C:\raylib\raylib\raylib_icon -Iexternal -lraylib -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm -std=c99 -Wl,-allow-multiple-definition -Wl,--subsystem,windows

Just remove -Wl,--subsystem,windows.

And them execute a cmd (the console black screen) and launch core_basic_window.exe program.

Please, let me know if you manage to get it.

mattackerplus commented 6 years ago

Here: 'gcc' is not recognized as an internal or external command, operable program or batch file.

raysan5 commented 6 years ago

You need to edit the Notepad++ raylib_compile_execute.

mattackerplus commented 6 years ago

In what way exactly?

raysan5 commented 6 years ago

when you press F6 on Notepad++, the window that appears contains a text script, just read it, look for -Wl,--subsystem,windows and delete that part.

mattackerplus commented 6 years ago

image

mattackerplus commented 6 years ago

That's all it does now

raysan5 commented 6 years ago

did you try running core_basic_window.exe directly from the command line (the ms-dos black window)?

mattackerplus commented 6 years ago

image

mattackerplus commented 6 years ago

Still no luck :(

raysan5 commented 6 years ago

ok, try running core_basic_window.exe directly from the command line (the ms-dos black window), not the compilation line (you're trying to run gcc -o core_basic_window.exe ...).

mattackerplus commented 6 years ago

image

mattackerplus commented 6 years ago

But I though I had fixed this problem

raysan5 commented 6 years ago

ok, so, that's the issue, your graphic card does not support OpenGL 3.3, you need to recompile it for OpenGL 1.1. Just follow the instructions: https://github.com/raysan5/raylib/wiki/FAQ

Remember to set GRAPHIC_API=GRAPHICS_API_OPENGL_11

raysan5 commented 6 years ago

just closing this issue.

yoel123 commented 4 years ago

i have the same problem