How to compile Raylib from scratch and set up your first projects (Windows / C ) in 15 minutes

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ม.ค. 2025

ความคิดเห็น • 191

  • @Birko98
    @Birko98 3 ปีที่แล้ว +30

    This is by far the best tutorial out there on how to compile raylib and build a project in it. Thank you for doing this.

    • @rudyfaile
      @rudyfaile  3 ปีที่แล้ว +2

      Thank you! 🙇‍♂️

  • @fedorvasilev5883
    @fedorvasilev5883 5 หลายเดือนก่อน +6

    The best explanation I found so far explaining how to actually compile the library.

  • @ISKLEMMI
    @ISKLEMMI 3 ปีที่แล้ว +17

    Thank you for this walkthrough! I'm very new to C, but with your help I've got my first .exe!
    I had issues compiling Raylib previously because I used the wrong version of mingw. But your instructions worked perfectly once I got rid of the artifacts from the 'wrong' compiler (the .o files).
    Thanks again!

    • @ISKLEMMI
      @ISKLEMMI 3 ปีที่แล้ว +3

      Also, thank you for explaining the compiler commands and showing us how to set all of this up without a bulky IDE.

  • @dylanneary4011
    @dylanneary4011 3 ปีที่แล้ว +7

    Outstanding presentation, clearly spoken, to the point, quick summaries. Thank you for the save.

  • @johnjackson9767
    @johnjackson9767 4 ปีที่แล้ว +4

    Awesome stuff, man! And thanks for the shoutout!

  • @timwright4513
    @timwright4513 3 ปีที่แล้ว +5

    Thank you for this. Exactly what I was looking for!

  • @nidadursunoglu6663
    @nidadursunoglu6663 6 หลายเดือนก่อน +1

    Thank you so much! Its a very short video but yet so easily understandable. Its the only turtorial that worked for me.

  • @derpysean1072
    @derpysean1072 ปีที่แล้ว +2

    Thank you very much, this is one of the rare ones that is actually helpful.

  • @santi34mg
    @santi34mg ปีที่แล้ว +2

    Great video dude. Helped so much!

  • @luigi9161
    @luigi9161 9 หลายเดือนก่อน

    After a WHOLE day of trying I got to your tutorial and it worked tysm!!! earned a like.

  • @not_herobrine3752
    @not_herobrine3752 2 ปีที่แล้ว

    this is by far, the least painful libary to compile from scratch. thank you for this

    • @rudyfaile
      @rudyfaile  2 ปีที่แล้ว +1

      Nice to hear and glad this helped!

  • @dylanstevens9624
    @dylanstevens9624 2 ปีที่แล้ว +2

    Great explanation and tutorial! Simple way to get it working outside of visual studio

    • @rudyfaile
      @rudyfaile  2 ปีที่แล้ว

      Thanks! You’re welcome. Glad you found it helpful.

  • @botteu
    @botteu 11 วันที่ผ่านมา

    Nice and concise. No fuss, no mess 👏

  • @aarondevelops
    @aarondevelops หลายเดือนก่อน +1

    this was massively helpful, thank you

    • @rudyfaile
      @rudyfaile  หลายเดือนก่อน

      @@aarondevelops you’re welcome :)

  • @pinguin472
    @pinguin472 3 ปีที่แล้ว +3

    liked and subbed, first time(due to bad version of mingw I think wich I realised too late(a good 1 year while I was doing only terminal based programs)) I achieved downloading a graphics library THANK YOU!

  • @unkn0wn40
    @unkn0wn40 23 วันที่ผ่านมา +1

    Thank you so much for this tutorial bro, you were super helpful

  • @migsygerzky2109
    @migsygerzky2109 5 หลายเดือนก่อน

    This one still works on version 5.0. Thank you for making the compilation easy to do.

    • @kira2curly
      @kira2curly 5 หลายเดือนก่อน

      Bro does it work for you that said run.ps1

    • @migsygerzky2109
      @migsygerzky2109 5 หลายเดือนก่อน

      @@kira2curly nope, it didn't. I just decided to manually type in the g++ (i'm using c++ so I used g++ for the terminal) everytime
      It can work if you tinker with the powershell security though, but uhhhhhhh I don't wanna and I'm not privy enough on how to do that

  • @Akselmoi
    @Akselmoi 3 ปีที่แล้ว +3

    Thank you so much. I was going nuts with trying to set this up, since I'm new with C and everything. Should've watched this first lol

    • @rudyfaile
      @rudyfaile  3 ปีที่แล้ว +1

      Np, glad you found it useful!

  • @karstenpenner3072
    @karstenpenner3072 9 หลายเดือนก่อน +1

    Only by watching this video I was finally able to run my first raylib exe. THANK YOU SO MUCH! One question though: Is it possible to surpress the popping up of the shell with all the info text showing up...?

    • @karstenpenner3072
      @karstenpenner3072 9 หลายเดือนก่อน +1

      Found sollution myself: Run gcc compiler with option -mwindows.

  • @pixelwrinkly1528
    @pixelwrinkly1528 3 ปีที่แล้ว +17

    pretty much a masterclass in how to make one of these installation tutorials
    clear instructions throughout; no lame attempts at humour or silly music
    many thanks for sharing your knowledge
    stoked to get this up and running; looking forward to see what i can do with it
    one question: do we really need the -I include/ part of our instruction to the compiler?
    doesn't the compiler already know where to find raylib.h given that we've hard coded that into our source file?
    thanks again; much appreciated

    • @KANJICODER
      @KANJICODER 2 ปีที่แล้ว +3

      #include "somefile.whatever" is literally a cut+paste operation. That is all you need for compiling your code. But that include never gets to the linker as it is consumed by the pre-processor.
      ( You can stop reading here. That is the answer. Below is more detail. )
      Compiling doesn't create an executable, it creates "compilation units".
      A lot of time, with a dead simple C program where you have zero external dependencies, you have only 1 compilation unit. Which is why I think sometimes people get lazy and say "compile your program" when they really mean "build your program". Where "build" means "compile and link".
      Since you are using "raylib" functions, when you link together your compilation unit with the raylib compilation unit (raylib.a) , the linker needs a way to cross check the raylib functions you are calling and be all like "Do these functions really exist in raylib.a ?"
      Technically a ".a" file is not a compilation unit, but a collection of compilation units.
      Whereas a ".o" file is a single compilation unit.
      Hopefully I got all that correct. Here is some of the stuff I looked at on stack overflow while answering. As my understanding of compiling and linking is pretty rudimentary myself.
      stackoverflow.com/questions/59251013/
      stackoverflow.com/questions/18548157/
      stackoverflow.com/questions/654713/

  • @nickvatanshenas9251
    @nickvatanshenas9251 ปีที่แล้ว +1

    Absolutely awesome tutorial!

  • @usoppgod8107
    @usoppgod8107 3 ปีที่แล้ว +2

    Thank you! this helped me a lot in understanding the underlying stuff.

  • @niklasengvall2607
    @niklasengvall2607 3 ปีที่แล้ว +1

    Cheers! A really awesome guide. Lots of thanks.

  • @falling12
    @falling12 3 ปีที่แล้ว +1

    Was getting an error building one of the example projects:
    "skipping incompatible"
    Solution was to run "mingw32-make clean" in raylib's src directory, then rebuild raylib. Replacing the raylib files I was using in the example project fixed the problem.

    • @CinnamonGrahams
      @CinnamonGrahams 8 หลายเดือนก่อน

      Yes! This saved me today

  • @Im_Ninooo
    @Im_Ninooo 3 ปีที่แล้ว +1

    Thank you very much! I was playing around with the Go raylib lib but it has some bugs so I decided to try out the official C version. :)

  • @Tinyjb0
    @Tinyjb0 ปีที่แล้ว +2

    All is well except when I go to download the mingw64 bit, it only gives a zip file, no installation wizard at all. What do I do? I was running on mingw32, but since apparently raylib is not compatible with that, I must install mingw64, which is giving me trouble. It's things like this that steer me away from programming. I suppose it's just a stumbling block I must get over if I want to succeed with programming. But jeeze... I've been spending hours just trying to get my IDE to be able to detect this library without any errors.
    What am I supposed to do when I go to the same link you went to to get mingw64, and it just gives me a zip file with a bunch of other files in it, no installation wizard. It's upsetting because I am a novice programmer, and It feels like little things like this go over so smoothly with others, and here I am spending hours just trying to successfully build it. Sigh. I just want to make an algorithm visualizer in c++.

  • @SillyOrb
    @SillyOrb 5 หลายเดือนก่อน

    This changes nothing about the video, but if you want to know more or found the mixing of MinGW and GCC confusing, this is for you:
    MinGW isn’t a compiler. GCC (GNU Compiler Collection) is the compiler and it’s included with MinGW. What is MinGW then? It’s a minimal set of tools and libraries common across GNU-based OSs, but tailored for Windows applications. Minimalist Gnu for Windows = MinGW. It gives you the development environment you have on GNU + Linux, but allows you to create native Windows applications on Windows as well as on GNU + Linux.

    • @rudyfaile
      @rudyfaile  4 หลายเดือนก่อน +1

      Great explanation! For what it's worth, I was aware of this when I created the video (and I think I kind of mention it when I discuss gcc and compilers in general) but didn't want to confuse beginners too much by getting too deep in the woods with the nuances of development on windows. Thanks for your clarifying comment!

  • @gabbusaii3375
    @gabbusaii3375 3 ปีที่แล้ว +2

    Great tutorial bro, just sad I cant use it since I got an error around 5:45. I've been trying to redo it for like 5 times now reinstalling everything but to no avail. Good tutorial nonetheless cheers bro

  • @sonimera9066
    @sonimera9066 ปีที่แล้ว

    This was very useful, thank you!

  • @lukamalovic8866
    @lukamalovic8866 2 ปีที่แล้ว +5

    when installing mingw it says the file has been downloaded incorrectly

    • @DTheoL
      @DTheoL 2 ปีที่แล้ว +1

      Then you have the wrong file had this with the non minimalist exe.

  • @heyitsandrew2209
    @heyitsandrew2209 4 ปีที่แล้ว +3

    Thanks for this. I've been tinkering with Raylib as a novice programmer. I've been looking for tutorials but there aren't very many for Raylib yet.

    • @rudyfaile
      @rudyfaile  4 ปีที่แล้ว +1

      No worries! Let me know if you have any questions or if there is another video that you would find helpful.

    • @heyitsandrew2209
      @heyitsandrew2209 4 ปีที่แล้ว +4

      @@rudyfaile I'm probably too new at all this but I've gone through nearly every example on the site. I love the way it looks and I'm ready to take a deep dive but I'm having trouble understanding how to combine the examples in a sensible way. Like how could a first timer make the transition from tinkering with examples to integrating multiple examples together? Like an opening menu that can transition you onto a play field.

    • @rudyfaile
      @rudyfaile  4 ปีที่แล้ว

      @@heyitsandrew2209 have you looked at github.com/raysan5/raylib/tree/master/templates ?

  • @fagemul1
    @fagemul1 4 ปีที่แล้ว +3

    Very nice Rudy, thks ;)

  • @angeltorres6465
    @angeltorres6465 3 ปีที่แล้ว +1

    Thank you, this helped me a lot !!

    • @rudyfaile
      @rudyfaile  3 ปีที่แล้ว

      You're welcome!

  • @viniciusbiazibastos6388
    @viniciusbiazibastos6388 ปีที่แล้ว

    finally i found one that works, man i love u

  • @aarfeenanees9147
    @aarfeenanees9147 26 วันที่ผ่านมา

    How do I do it with cmake?
    I opened command prompt in src folder and typed "cmake .."
    This should've given me a dll file (instead of .a file), but I got include errors. Basically cmake can't find files it needs to include from raylib/cmake, although that directory is present with all the files

  • @TheChestnutBowl
    @TheChestnutBowl 3 ปีที่แล้ว

    This was a great help!

  • @mrdevel6664
    @mrdevel6664 ปีที่แล้ว +2

    Bro there is some error during buliding raylib it's rmodule.o error can u help pls

    • @cyqry
      @cyqry ปีที่แล้ว

      I'm getting this too for version 4.5.
      Anyone know what the issue is? At this point I've just downloaded the source from the same location, just a more recent version, so I have no idea why it would be throwing errors since there's literally no other changes on my part.

  • @joseloeza371
    @joseloeza371 2 ปีที่แล้ว

    Heyy amazing video on Raylib... Indeed so good... Thanks so much... Greethings from Dayton Ohio

  • @pseudopseudo3679
    @pseudopseudo3679 3 ปีที่แล้ว

    excited for next ep :)

    • @rudyfaile
      @rudyfaile  3 ปีที่แล้ว +1

      I wasn't planning on making one - what would you like to see in another episode?

    • @pseudopseudo3679
      @pseudopseudo3679 3 ปีที่แล้ว +1

      @@rudyfaile Good Question :D,
      Maybe something along the lines of basic physics simulation?
      Maybe simple use of tiles and sprites?
      There is loads of documentation on raylib so it doesn't matter if you don't have the time or weren't planning on doing a follow up - it is a great video on its own. Would be nice though :D.
      Really enjoyed the video.

  • @aleksszukovskis2074
    @aleksszukovskis2074 3 ปีที่แล้ว +1

    now the mingw link is a collection of lib and header files. its not an installer anymore and i dont know what to do anymore

  • @willkamechehe1496
    @willkamechehe1496 3 ปีที่แล้ว +1

    Hi, i followed this turorial but i want to code in c++. I enter the command and it says "-std=c99" is valid for C/ObjC but not for C++. Any ideas how i could? Without having to reinstall everything?

    • @KANJICODER
      @KANJICODER 2 ปีที่แล้ว

      My guess is your Mingw/gcc installation is missing C.
      My reasoning: When I install gcc I intentionally remove all C++ stuff so I never accidentally compile "C++" code. Possibly you intentionally did not install "C" so you wouldn't accidentally compile "C" code as you are a "C++" dev?

  • @kuba02
    @kuba02 2 หลายเดือนก่อน

    so I want to use c++ instead of c, what compiler flag should i use in place of std=c99?

  • @Jonlin11
    @Jonlin11 3 ปีที่แล้ว

    Fantastic video, thanks!

    • @rudyfaile
      @rudyfaile  3 ปีที่แล้ว

      Glad it helped!

  • @nahimyaya1794
    @nahimyaya1794 3 ปีที่แล้ว +1

    This is great! Now I can use raylib with sublime. I really hate the interface of that NotePad-like editor that comes with it

  • @accountprincipale2293
    @accountprincipale2293 ปีที่แล้ว

    how could i do if i wanted to move all the .c file in a src file and then compile? if i try it says it can't find raylib, even if i change the command line or the include/raylib in just raylib

  • @garethwong-n8c
    @garethwong-n8c หลายเดือนก่อน +1

    awesome tutorial! is there any way to get the exe to run without a command prompt opening up in the background?

    • @rudyfaile
      @rudyfaile  หลายเดือนก่อน

      @@garethwong-n8c yeah. It’s a compiler flag. If you can’t find it let me know and I’ll look.

  • @RandomJeevanYT
    @RandomJeevanYT 7 หลายเดือนก่อน

    Is it similar if I do this for c++? The only difference i know of is using g++ instead of gcc and not using std -c99 i guess.
    Please let me know if there are any other changes i gotta do.🙏🙏

  • @DrinkinMusic
    @DrinkinMusic 2 ปีที่แล้ว

    I had this setup on my previous PC, but now it doesn't work anymore. I am not using Visual Studio Code, but Visual Studio Community 2022, and I am not sure which paths to add or where... It can find the header file for raylib, but then the linker complains that there are unresolved external symbols for all the built in things such as "InitWindow" etc.

  • @1negroup841
    @1negroup841 ปีที่แล้ว

    What do you do if you have Cyngus/Cynwin? installing MinGW doesn't work for my system I keep getting a download did not install correctly.
    What do you do if you have Cyngus/Cynwin are there any -make commands for Cyngus and if there is where do I find them?

  • @tomigon3987
    @tomigon3987 2 ปีที่แล้ว

    I cant seem to get the installer to work ( for mingw) , would you happen to have any idea why? It says "The file has been downloaded incorrectly!" I have tried reinstalling the program.

  • @StarContract
    @StarContract 3 ปีที่แล้ว +1

    excellent tutorial

  • @YasserS19
    @YasserS19 5 หลายเดือนก่อน +1

    very nice video! I have a question, how do I compile my game in release mode? so I don't have the console window show up.

    • @rudyfaile
      @rudyfaile  5 หลายเดือนก่อน +1

      It's a compiler option. Check out github.com/rfaile313/draw_game/blob/master/compile/win/run.bat#L23

    • @YasserS19
      @YasserS19 5 หลายเดือนก่อน +1

      @@rudyfaile thank you :)

  • @PySnek
    @PySnek 5 หลายเดือนก่อน

    thank you so much :) to make things even easier, choco install mingw installs mingw with one command in the terminal (execute it as admin)

    • @rudyfaile
      @rudyfaile  5 หลายเดือนก่อน

      Folks might not have choco installed. This guide is assuming someone has nothing that's why the first step is checking your system's path.

    • @PySnek
      @PySnek 5 หลายเดือนก่อน

      @@rudyfaile oh sorry, I thought that's already by default installed on newer Windows versions

    • @rudyfaile
      @rudyfaile  5 หลายเดือนก่อน

      @@PySnek it’s possible! If so, it’s not something I’m aware of 😁

  • @valeriovergni3339
    @valeriovergni3339 3 ปีที่แล้ว +2

    when compiling the library i get this error:
    Makefile:589: recipe for target 'raudio.o' failed
    mingw32-make: *** [raudio.o] Error 1

    • @mmaaauuuuiiiii
      @mmaaauuuuiiiii 3 ปีที่แล้ว +1

      I had the same issue at first, I was using my already installed minGW but after reinstalling minGW it was fixed.

    • @valeriovergni3339
      @valeriovergni3339 3 ปีที่แล้ว +2

      @@mmaaauuuuiiiii ok, I Just removed raudio.c from the makefile

    • @danielesquivel3155
      @danielesquivel3155 3 ปีที่แล้ว

      x2

  • @shendocodm5196
    @shendocodm5196 8 หลายเดือนก่อน

    Could you please help me how to change to c++ . Are there any changes ? . Thank you for reading ❤ hope i get help from you❤

  • @miguelsolorzano639
    @miguelsolorzano639 3 ปีที่แล้ว

    Hello, great video, just easy to understand

  • @habibullaharif2724
    @habibullaharif2724 11 วันที่ผ่านมา

    gcc main.c -o game.exe -O1 -Wall -std=c99 -Wno-missing-braces -I include/ -L lib/ -lraylib -opengl32 -lgdi32 -lwinmm
    when i run this command it doesn't produce excutable with name of game.exe but it produces file with name of pengl32.exe, is there any issue here?
    greate video by the way, amazing explanation.

  • @riuza9681
    @riuza9681 2 ปีที่แล้ว +1

    I'm new to C and it was pretty much exactly what I needed thank you !
    Quick question for anyone though : where do the flags "-lopengl32 -lgdi32 -lwinmm" come from ? Where do you find which libs the compilation needs (apart from libraylib.a of course) ?
    It doesn't seem, to me, that any kind of documentation mentions them, but of course it's not true, I just can't find it :/

    • @user-sb5vt8iy5q
      @user-sb5vt8iy5q ปีที่แล้ว

      9 months late but, winmm and gdi32 are libraries every windows system has, they will be available on 100% of windows machines (unless you messed up some configuration), opengl32 is usually externally downloaded, but raylib packages it's own openGL, basically when you compile raylib you also compile a openGL, windows libraries end with .a, those are linkable, .dlls have to be loaded at runtime and they need to be in the same folder as the .exe you compiled.

  • @ashittymobile1014
    @ashittymobile1014 2 ปีที่แล้ว

    in the compile command i got en error saying "cc1.exe: error: argument to '-O' should be a non-negative integer, 'g', 's', or 'fast'
    im completely lost can i get some help?

    • @not_herobrine3752
      @not_herobrine3752 2 ปีที่แล้ว

      when in doubt, remove the "-O" flag as it isnt important to get the executable compiling

  • @abrorabyyu6221
    @abrorabyyu6221 2 ปีที่แล้ว

    it works really well but where is the documentation especially for -I include/ -L lib/ -lraylib -lopengl32 -lgdi32 -lwinmm. this command really helpfull than setting in ide

  • @therealrgb2354
    @therealrgb2354 2 ปีที่แล้ว +1

    im getting a error: "gcc.exe: error: -E or -x required when input is from standard input"

  • @bash141
    @bash141 2 ปีที่แล้ว

    I have a problem because I have installed mingw through msys and the make command doesnt work. Can someone help me pls?

  • @TheTimeProphet
    @TheTimeProphet ปีที่แล้ว

    I am wondering if you would do a tutorial for getting it to work in Code::blocks which is my IDE of choice. I am going to have a go doing it the way you said, but then I am going to try and get it to work in Code::blocks, but I will probably mess up LOL.

  • @flewwasse
    @flewwasse ปีที่แล้ว

    Thanks this really helped.

  • @mmaaauuuuiiiii
    @mmaaauuuuiiiii 3 ปีที่แล้ว +1

    When compiling the basic window I'm receiving an error that it skips the incompatible lib//libraylib.a looking for -lraylib I've also tried changing the "-L lib/" to "-L lib" and that gives me the same error just skipping lib/libraylib.a. I didn't have a problem compiling raylib. Does anyone know what might be causing this?
    The full error:
    C:/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible lib//libraylib.a when searching for -lraylib
    C:/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible lib/\libraylib.a when searching for -lraylib
    C:/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible lib//libraylib.a when searching for -lraylib
    C:/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lraylib

    • @mmaaauuuuiiiii
      @mmaaauuuuiiiii 3 ปีที่แล้ว +1

      So if anyone is running into this issue I found a fix. When I compiled raylib the first time I used GitBash since that is the terminal I prefer, however when I recompiled raylib in powershell the new libraylib.a seems to work. I'm not sure why compiling in powershell instead of gitbash fixes the issue. If anyone knows why this happens I would love to know.

    • @alan5506
      @alan5506 3 ปีที่แล้ว

      @@mmaaauuuuiiiii Thanks! I used command prompt and I had the same issue. Used powershell instead and it worked.
      I would also love to know why this happened.

    • @feliperoehe904
      @feliperoehe904 2 ปีที่แล้ว

      i am having the same problem and i tried to compile with powershell and it didnt worked as well. Can anyone help me please?

  • @HalimShamsShorts
    @HalimShamsShorts 3 ปีที่แล้ว +1

    You are my heroooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo!

  • @melissamuniz2567
    @melissamuniz2567 3 ปีที่แล้ว

    5:45 my ps returned
    Makefile:589: recipe for target 'raudio.o' failed
    mingw32-make: *** [raudio.o] Error 1

    • @rudyfaile
      @rudyfaile  3 ปีที่แล้ว +1

      Sounds like 32 bit version of mingw and not 64 bit

    • @melissamuniz2567
      @melissamuniz2567 3 ปีที่แล้ว +1

      @@rudyfaile thanks

    • @melissamuniz2567
      @melissamuniz2567 3 ปีที่แล้ว

      @@rudyfaile It's ok if I build using notepad ++? cuz i can't install the mingw like you did

    • @rudyfaile
      @rudyfaile  3 ปีที่แล้ว +1

      @@melissamuniz2567 you can build using notepad++ using my approach or you can build using raylib’s notepad++ script it’s up to you

    • @melissamuniz2567
      @melissamuniz2567 3 ปีที่แล้ว

      bro, can u help me once again?

  • @marcbaquessabat9688
    @marcbaquessabat9688 3 ปีที่แล้ว

    Really helpfull, thank you!

  • @weeb3277
    @weeb3277 3 ปีที่แล้ว

    Can you do a video on how to organize a large project?

  • @ThirdJoker
    @ThirdJoker 3 ปีที่แล้ว +1

    Thank you so much!

  • @takis76
    @takis76 2 ปีที่แล้ว

    Will you show us how to compile RayGui or ImGui too? (Thank you).

  • @michaelianleguira7020
    @michaelianleguira7020 3 ปีที่แล้ว

    Hey what if i want to make a .exe file in opengl 1.1 or 2.1?

  • @Φοιβος-ε2υ
    @Φοιβος-ε2υ 3 ปีที่แล้ว +1

    I am getting:
    lib//libraylib.a(core.o):core.c:(.text+0x1638): undefined reference to `__mingw_realloc'
    lib//libraylib.a(core.o):core.c:(.text+0x705a): undefined reference to `__mingw_free'
    ...
    collect2.exe: error: ld returned 1 exit status
    Do you have any idea?

    • @qerplunk
      @qerplunk 3 ปีที่แล้ว

      I have the same problem too. I followed the steps exactly, and even re-made the vs project from scratch but it gives me the same error.

    • @alan5506
      @alan5506 3 ปีที่แล้ว +1

      Use powershell. Not command prompt or whatever. To compile raylib

    • @Φοιβος-ε2υ
      @Φοιβος-ε2υ 3 ปีที่แล้ว +1

      @@alan5506 fixed it a while ago by recompiling the source code from the command prompt. I don't know what the problem was but recompiling might just fix it.

    • @hmzakhalid
      @hmzakhalid 3 ปีที่แล้ว

      @@Φοιβος-ε2υ Recompile Raylib?

    • @mikamulperi
      @mikamulperi 3 ปีที่แล้ว

      I am also getting this error. Does not help to compile raylib again.

  • @BlacKHellCaT78
    @BlacKHellCaT78 ปีที่แล้ว

    how do i link multiple .h/.cpp files? :(

  • @thespontaneoustomato2676
    @thespontaneoustomato2676 3 ปีที่แล้ว

    Will the same thing work for raylib C# binding and can I have to use VScode or would I have to use a different IDE like VS 2017.

    • @Cxdyy
      @Cxdyy 3 ปีที่แล้ว

      The C# Setup is different from the C/C++ setup. I've just been getting errors from even trying to setup C# lol

    • @thespontaneoustomato2676
      @thespontaneoustomato2676 3 ปีที่แล้ว

      @@Cxdyy D:

    • @Cxdyy
      @Cxdyy 3 ปีที่แล้ว +2

      @@thespontaneoustomato2676 Hey man, When I tried setting up Raylib C# in VS2019 it didn't work, but I tried it in VSCode and it worked :D
      Open up the terminal, type "dotnet new console"
      then after that is setup type "dotnet add package Raylib-cs --version 3.7.0"
      and then to run it, type "dotnet run"

    • @thespontaneoustomato2676
      @thespontaneoustomato2676 3 ปีที่แล้ว

      @@Cxdyy ok

  • @MrUserasd
    @MrUserasd 2 ปีที่แล้ว

    Thanks for the video. Would be much more helpful as text article, but I guess we have no other choice anyway.

  • @TrollFace34
    @TrollFace34 5 หลายเดือนก่อน

    Is there going to be a GNU/Linux tutorial?

  • @profoundknowledge763
    @profoundknowledge763 3 ปีที่แล้ว

    Quick question? Is this the same process for clion

    • @rudyfaile
      @rudyfaile  3 ปีที่แล้ว

      No - you'd probably want to look into the IDE's instructions.... looks like others have had success: github.com/raysan5/raylib/wiki/Working-for-Web-(HTML5)#building-with-clioncmakeemscripten-for-web

  • @WaheedAhmed14
    @WaheedAhmed14 3 ปีที่แล้ว

    I hope you're still active because I need some help.
    I'd like to have a src folder with all the code to make it a bit clearer. If I run the build commands for the compiler from the src folder, it says it can't find raylib.h. Is there a change I'd have to do to make it possible for this to work.
    I can get it to build if I run the commands from the main dir, and just reference the main.c in the build commands with gcc src/main.c etc. but this would cause problems with the stuff the source code references no longer matching its relative file path.
    Is there a way I could slightly modify the gcc build commands so that it works from within c.
    Also thanks for the video.

    • @TopShelfization
      @TopShelfization 3 ปีที่แล้ว

      If you mean you have it setup like:
      [some-project-folder]
      |
      |-----[include]
      | |-----------raylib.h
      |
      |-----[lib]
      | |----------libraylib.a
      |
      |-----[src]
      |-----------main.c
      And you want to run the compiler command from the "src" directory.
      It's looking for "include" and "lib" in the "src" directory when they are in the parent directory.
      Changing:
      -I include/ -L lib/
      to
      -I ../include/ -L ../lib/
      So it looks for those directories in the parent directory should suffice.
      (edit: removed unnecessary tip)

    • @rochefamily9707
      @rochefamily9707 3 ปีที่แล้ว

      You can try to type
      ../include/
      two dots mean to go back a directory

  • @arifkasim3241
    @arifkasim3241 3 ปีที่แล้ว

    Thanks for this. Could you make a similar video showing how to install Allegro 5.2.6 in a similar way so that we can use it in vscode or sublime text.

    • @rudyfaile
      @rudyfaile  3 ปีที่แล้ว

      You're welcome. Unfortunately I have never used Allegro so I probably wouldn't be the best person to make a video for it.

    • @arifkasim3241
      @arifkasim3241 3 ปีที่แล้ว

      @@rudyfaile Ok, thanks.

  • @frankstercodestuff
    @frankstercodestuff ปีที่แล้ว

    does it also work with c++ or no?

    • @rudyfaile
      @rudyfaile  ปีที่แล้ว

      I see no reason you can't make this method work with C++

  • @ashergomez
    @ashergomez 3 ปีที่แล้ว

    Great video! I’d love to see one using Linux.

    • @rudyfaile
      @rudyfaile  3 ปีที่แล้ว

      It’s even easier on Linux because you’re going to have gcc and make in your path on 99% of distros.

  • @DhruvPatel-ou7lz
    @DhruvPatel-ou7lz ปีที่แล้ว

    not able make static library

  • @mycatmauser
    @mycatmauser 2 ปีที่แล้ว +1

    "This app cant run on your computer" Help!!!

    • @slowbro13215
      @slowbro13215 ปีที่แล้ว +1

      This is almost always because .dll files are missing & need to be placed in the same directory as the executable. Sorry you didn't get a timely reply, hopefully this can be useful to you or someone else reading

  • @fsForward
    @fsForward 8 หลายเดือนก่อน

    No😭 One day I had raylib working without inlcuding the lib/include folders. It was just #include But I don't know to do it anymore, I added the lib/include to my windows variable PATH, but it isnt working😭

    • @Ashwin_1198
      @Ashwin_1198 7 หลายเดือนก่อน +2

      type this in terminal and hit enter it should work fine
      gcc -o main.exe main.c C:
      aylib
      aylib\src
      aylib.rc.data -s -O2 -IC:
      aylib
      aylib\src -LC:
      aylib
      aylib\src -lraylib -lopengl32 -lgdi32 -lwinmm -std=c99 -Wall -mwindows
      no need to add any sort of file or folder
      just make sure raylib is installed in default directory (i.e C:/raylib)
      and copy paste basic_core_window.c to main.c

    • @fsForward
      @fsForward 7 หลายเดือนก่อน

      @@Ashwin_1198 Never thought I would get a reaction. I chabged c++ built in library and added raylib there. But thanks for this command, should come in handy🤌🏻🫶🏻

  • @florianunterfrauner2041
    @florianunterfrauner2041 2 ปีที่แล้ว

    is it possible to remove the console logs?

    • @florianunterfrauner2041
      @florianunterfrauner2041 2 ปีที่แล้ว

      because for every change of the screen, there is a log in the console

    • @rudyfaile
      @rudyfaile  2 ปีที่แล้ว

      @@florianunterfrauner2041 do you have an example?

    • @florianunterfrauner2041
      @florianunterfrauner2041 2 ปีที่แล้ว

      @@rudyfaile i have solved it with adding some flags

  • @VoidloniXaarii
    @VoidloniXaarii ปีที่แล้ว

    Thank you!

  • @danielromaniak
    @danielromaniak 2 ปีที่แล้ว

    It'd be nice if you explain how to configure it to work with Visual Studio tasks

    • @rudyfaile
      @rudyfaile  2 ปีที่แล้ว

      That doesn't really have anything to do with compiling raylib, though I am sure you could create tasks to execute some of the commands in this video.

  • @duftcola
    @duftcola 3 ปีที่แล้ว

    unrecognized command "-01"

    • @rudyfaile
      @rudyfaile  3 ปีที่แล้ว

      Yeah, it's an "O" for optimization, not a 0 :)

  • @danielesquivel3155
    @danielesquivel3155 3 ปีที่แล้ว

    gracias!!!!!! alfin me funciono, aunque el modulo de audio me dio error entoces lo saque :v

    • @yuli3873
      @yuli3873 2 ปีที่แล้ว

      Perdón que te moleste, pero al compilar como en el video, no incluye las librerias extras de Raylib, cierto? Cómo hay que indicar que queremos incluirlas en la compilación sino? Mi idea es tener todas las librerias extras incluidas también.

  • @danielesquivel3155
    @danielesquivel3155 3 ปีที่แล้ว

    no sabia que eras amigo del que hizo pistolero UwU

  • @Cerbyo
    @Cerbyo 2 ปีที่แล้ว +1

    U SAY TO GET THE 64 BIT VERSION THEN U INSTALL AN .EXE THAT HAS BOTH 64 AND 32BIT. THEN U CHANGE ARCHITECTURE TO 64...BUT THEN U CHANGE IT BACK TO 32 AND TELL US TO MAKE SURE ITS THE 32BIT VERSION????? WTFFF????

    • @rudyfaile
      @rudyfaile  2 ปีที่แล้ว +4

      relax buddy

  • @Cerbyo
    @Cerbyo 2 ปีที่แล้ว +1

    u arent teaching people at all how to compile things themselves. i can give them countless other things and say "compile it" and they'd be lost.

  • @willcraig6096
    @willcraig6096 3 ปีที่แล้ว +2

    Awesome tutorial, however I am getting an error when I try to build it: *lib//libraylib.a(rglfw.o):rglfw.c:(.text+0x37fb): undefined reference to `__ms_vsnprintf'*
    Does anyone know what might be causing it and how I could fix it?

  • @vidurlutchminarain3686
    @vidurlutchminarain3686 3 ปีที่แล้ว

    I keep getting this error: Makefile:589: recipe for target 'raudio.o' failed
    mingw32-make: *** [raudio.o] Error 1, any idea how to fix this?

    • @rudyfaile
      @rudyfaile  3 ปีที่แล้ว

      Sounds like mingw 32 bit - I would recommend installing the 64 bit version

    • @vidurlutchminarain3686
      @vidurlutchminarain3686 3 ปีที่แล้ว

      @@rudyfaile I solved the issue, I installed mingw for posix not win 32

  • @Iamanugget111
    @Iamanugget111 ปีที่แล้ว

    i have look for so many tutorials and i still cant figure out how to get mingw32-make PLATFORM=PLATFORM_DESKTOP to work...

  • @devcat4858
    @devcat4858 2 ปีที่แล้ว

    hey i have a question so i have MinGW and the GCC where command confirms it but the raylib file says it doesn't exists any help?

  • @twinspectre
    @twinspectre 4 หลายเดือนก่อน

    It gives me error 404 not found when I click MinGW-W64-builds :(

  • @DeepRockLabs
    @DeepRockLabs 8 หลายเดือนก่อน

    Thank you!

    • @RandomJeevanYT
      @RandomJeevanYT 7 หลายเดือนก่อน +1

      hey is it similar procedure for c++

    • @DeepRockLabs
      @DeepRockLabs 7 หลายเดือนก่อน

      @@RandomJeevanYT Yes