cc main.c -lraylib -lGL -lm -lpthread -ldl -lrt -lX11
```
```
## Common issues
#### I get an error: `error while loading shared libraries: libraylib.so.351: cannot open shared object file: No such file or directory` after rebooting. Right after building the library it worked fine.
If you install raylib with `RAYLIB_LIBTYPE=SHARED` you may find that compiler is unable to locate library file. That is because raylib wasn't installed to stander system library directories. You can check in which directory raylib was installed by looking at the `make install` output:
In this case raylib was installed to `/usr/local/lib`, but it can be that raylib gets installed into `/usr/local/lib64` or some other directory. You should check the output yourself and make sure, that missing files are located in that directory.
Next all you need to do is either specify that install path in the makefile or set an enviroment variable. You can set an enviroment variable by typing:
`export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib` (replace `/usr/local/lib` with your install path)
You can append this command to the end of your `~/.bashrc` or `~/.zshrc` or other user login script, to make the change permanent. If you do so you'll be able to compile right away after you relogin. If you don't want to relogin just run `source <YOUR USER LOGIN SCRIPT>`