0

lets say my makefile looks like this:

CXX = g++

OGLLIBS = -lglut32 -lglu32 -lopengl32

projname : projname.o
    ${CXX} -o projname $< ${OGLLIBS}

Then in which directory does g++ look for the libraries? I was assuming . but if I put the libs there it still complains about not finding them (*.lib is the correct file or does unix use another ending?!)

user1709708
  • 1,557
  • 2
  • 14
  • 27

1 Answers1

0
  1. Folders unix uses the folders /lib (for system lib) and /usr/lib your own libraries or newly installed should be in /usr/local/lib but you need to add "-I/usr/local/lib" as compiler flag.

  2. file ending is .so for shared libs basicly

  3. looking for libs your can tell your compiler to add other directories to look for libs by setting a variable called LD_LIBRARY_PATH=/root-to-my-libs

SolvedForHome
  • 152
  • 1
  • 15