Hi there, complete Odin beginner here. I’m looking to tinker with a simple game idea, and was able to build and run the GLFW example from the Odin overview documentation without issue. Yay!
I can similarly create a basic Raylib window with Karl Zylinski’s example code.
But when I try a basic SDL3 example for comparison:
package main
import "core:fmt"
import SDL "vendor:sdl3"
main :: proc() {
if !SDL.Init({.VIDEO}) {
fmt.eprintln("Failed to initialize SDL:", SDL.GetError())
return
}
defer SDL.Quit()
}
I get:
$ odin version
odin version dev-2025-04-nightly:d9f990d
$ odin run .
ld: library 'SDL3' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What am I doing wrong? Is SDL3 bundled with Odin differently than GLFW and Raylib? I assume I’m misunderstanding something basic.
If it helps, I’m on macOS 15.4.1 (ARM), and I installed Odin by just downloading the latest stable release from GitHub, extracting dist.tar
adding the folder to my PATH
, and then running xattr -d com.apple.quarantine
on the odin
executable and the libs for libLLVM
/libz3
/libzstd
to resolve the macOS quarantine issues. Thanks in advance.