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

Поделиться
HTML-код
  • Опубликовано: 26 дек 2024

Комментарии • 189

  • @Birko98
    @Birko98 3 года назад +29

    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 4 месяца назад +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 3 года назад +4

    Awesome stuff, man! And thanks for the shoutout!

  • @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.

  • @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.

  • @timwright4513
    @timwright4513 3 года назад +5

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

  • @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/

  • @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.

  • @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!

  • @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!

  • @luigi9161
    @luigi9161 8 месяцев назад

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

  • @santi34mg
    @santi34mg Год назад +2

    Great video dude. Helped so much!

  • @migsygerzky2109
    @migsygerzky2109 4 месяца назад

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

    • @kirubelalemayehu10c67
      @kirubelalemayehu10c67 4 месяца назад

      Bro does it work for you that said run.ps1

    • @migsygerzky2109
      @migsygerzky2109 4 месяца назад

      @@kirubelalemayehu10c67 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

  • @aarondevelops
    @aarondevelops Месяц назад +1

    this was massively helpful, thank you

    • @rudyfaile
      @rudyfaile  Месяц назад

      @@aarondevelops you’re welcome :)

  • @derpysean1072
    @derpysean1072 Год назад +2

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

  • @unkn0wn40
    @unkn0wn40 12 дней назад +1

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

  • @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.

  • @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++.

  • @aarfeenanees9147
    @aarfeenanees9147 15 дней назад

    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

  • @nickvatanshenas9251
    @nickvatanshenas9251 Год назад +1

    Absolutely awesome tutorial!

  • @usoppgod8107
    @usoppgod8107 3 года назад +2

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

  • @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.

  • @heyitsandrew2209
    @heyitsandrew2209 3 года назад +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  3 года назад +1

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

    • @heyitsandrew2209
      @heyitsandrew2209 3 года назад +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  3 года назад

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

  • @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.

  • @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.

  • @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

  • @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 :)

  • @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. :)

  • @SillyOrb
    @SillyOrb 4 месяца назад

    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!

  • @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?

  • @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

  • @therealrgb2354
    @therealrgb2354 2 года назад +1

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

  • @niklasengvall2607
    @niklasengvall2607 3 года назад +1

    Cheers! A really awesome guide. Lots of thanks.

  • @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.

  • @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

  • @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

  • @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.

  • @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?

  • @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❤

  • @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

  • @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?

  • @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.

  • @sonimera9066
    @sonimera9066 Год назад

    This was very useful, thank you!

  • @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?

  • @fagemul1
    @fagemul1 3 года назад +3

    Very nice Rudy, thks ;)

  • @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

  • @Φοιβος-ε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.

  • @takis76
    @takis76 2 года назад

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

  • @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.

  • @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

  • @angeltorres6465
    @angeltorres6465 3 года назад +1

    Thank you, this helped me a lot !!

  • @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

  • @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.

  • @DhruvPatel-ou7lz
    @DhruvPatel-ou7lz Год назад

    not able make static library

  • @BlacKHellCaT78
    @BlacKHellCaT78 Год назад

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

  • @viniciusbiazibastos6388
    @viniciusbiazibastos6388 Год назад

    finally i found one that works, man i love u

  • @PySnek
    @PySnek 4 месяца назад

    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  4 месяца назад

      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 4 месяца назад

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

    • @rudyfaile
      @rudyfaile  4 месяца назад

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

  • @michaelianleguira7020
    @michaelianleguira7020 3 года назад

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

  • @TheChestnutBowl
    @TheChestnutBowl 3 года назад

    This was a great help!

  • @TrollFace34
    @TrollFace34 4 месяца назад

    Is there going to be a GNU/Linux tutorial?

  • @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🤌🏻🫶🏻

  • @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

  • @Jonlin11
    @Jonlin11 3 года назад

    Fantastic video, thanks!

  • @weeb3277
    @weeb3277 3 года назад

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

  • @flewwasse
    @flewwasse Год назад

    Thanks this really helped.

  • @MrUserasd
    @MrUserasd 2 года назад

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

  • @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

  • @ThirdJoker
    @ThirdJoker 3 года назад +1

    Thank you so much!

  • @miguelsolorzano639
    @miguelsolorzano639 3 года назад

    Hello, great video, just easy to understand

  • @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

  • @StarContract
    @StarContract 3 года назад +1

    excellent tutorial

  • @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.

  • @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.

  • @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++

  • @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

  • @marcbaquessabat9688
    @marcbaquessabat9688 3 года назад

    Really helpfull, thank you!

  • @HalimShamsShorts
    @HalimShamsShorts 3 года назад +1

    You are my heroooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo!

  • @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.

  • @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.

  • @duftcola
    @duftcola 3 года назад

    unrecognized command "-01"

    • @rudyfaile
      @rudyfaile  3 года назад

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

  • @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????

  • @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...

  • @twinspectre
    @twinspectre 3 месяца назад

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

  • @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?

  • @DeepRockLabs
    @DeepRockLabs 8 месяцев назад

    Thank you!

    • @RandomJeevanYT
      @RandomJeevanYT 7 месяцев назад +1

      hey is it similar procedure for c++

    • @DeepRockLabs
      @DeepRockLabs 7 месяцев назад

      @@RandomJeevanYT Yes