How to set up SDL2 on macOS 10.12 (without Xcode)

Поділитися
Вставка
  • Опубліковано 31 січ 2025

КОМЕНТАРІ • 12

  • @katlehokomeke
    @katlehokomeke 6 років тому +1

    What's the point of the sample code?

  • @phraggers
    @phraggers 7 років тому +5

    Hey! I get the error "SDL2.h not found" when using the gcc command you show here, Any tips? :)
    edit: Also what is the -F flag? I haven't seen that before
    edit2: OK so the error is actually "undefined symbols for architecture x86/64".
    edit3: Alright I fixed it I used the same code as Am Nerd uses in the video but instead of -F I use -I. I think it's because I'm doing this in C++ instead of C? Not sure if that makes a difference.

    • @ikokujin
      @ikokujin 6 років тому +3

      @YgYa I used this: g++ 01_hello_SDL.cpp -I/Library/Frameworks/SDL2.framework/Headers -F/Library/Frameworks -framework SDL2

    • @paudelvishal
      @paudelvishal 2 роки тому

      Hi! Would you mind telling me what does -F or -I do, I am not able to understand

    • @phraggers
      @phraggers 2 роки тому

      @@paudelvishal Sorry, I tried replying to you 4 times but youtube keeps deleting my reply for some reason.

    • @theRedFroug
      @theRedFroug 2 роки тому

      @@phraggers Do you know how to solve the ' error: no such file or directory: 'SDL2' ' problem???

    • @phraggers
      @phraggers 2 роки тому

      @@theRedFroug -I adds a directory to the include search path so work from there, any include you have in your code searches the directories in your include path. It's hard to help without specifics in a youtube comment!

  • @roseblack6089
    @roseblack6089 5 років тому

    don't used on mac15