The static library is: /home/jonathan/Dropbox/C++/teapotgame/bin/liblua.a
The current gcc command im using is: gcc -std=c++11 -DLUA_USE_LINUX -D_REENTRANT -I/usr/include/SDL2 -lSDL2 -lSDL2_image -lGL -lGLU -lGLEW -lopenal files.o -o bin/bin
There's no principal difference whether you link against dynamic or static libraries (besides the -l prefix and omitting the file extension for shared libs). The order of the libraries can matter though. If you have circular dependencies, you have to list the same library twice.
g++ -std=c++11 -DLUA_USE_LINUX -D_REENTRANT -I/usr/include/SDL2 files.o -o bin/bin -lSDL2 -lSDL2_image -lGL -lGLU -lGLEW -lopenal /home/jonathan/Dropbox/C++/teapotgame/bin/liblua.a