0

I just installed the SFML library using the following command: apt-get install sfml-dev

and after installing it I went to my /usr/lib folder to find out what the actual shared object's name is (so that I know what to tell my compiler what to use).

But there was nothing with "SFML" in the name there.

There was, however, an SFML folder in my /usr/include directory.

So where are the shared object files, if they aren't in my /usr/lib directory?

How can I find them, so that I can figure out what to tell the compiler to use?

g++ *.cpp -o exe -l?

1

1 Answer 1

0
gcc -print-search-dirs

shows all the search paths the compiler uses.

dpkg -L libsfml-dev

shows all the files installed by the package; to find the actual library though you’ll need to run dpkg -L on whichever package actually contains the library (libsfml-dev has a number of library dependencies).

In any case, libraries typically end up in /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH) nowadays on Debian derivatives, i.e. /usr/lib/x86_64-linux-gnu on common 64-bit PCs. You don’t actually need to worry about that with your compiler though, it already knows where to find the libraries — you just need to figure out what -l parameters to provide it with.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .