0

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

3
  • 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 Commented Apr 24, 2017 at 0:47
  • Always put source files before libraries. Commented Apr 24, 2017 at 0:47
  • Is that really your linkage command line? And is it successful? Commented Apr 24, 2017 at 7:47

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.