I'm trying to build a large application, yet for some reason linking fails and ld responds
/usr/bin/ld: cannot find -l/usr/lib/x86_64-linux-gnu/libX11.so
Steps I've tried:
- libx11-dev is correctly installed and the file libX11.so is a symlink that points to libX11.so.6.3.0
- Removed the link and recreated it with
ln -s /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0 /usr/lib/x86_64-linux-gnu/libX11.so
ldconfig -vto update the cache. No luck...
Anybody have any idea?
Sato Katsura posted a very helpful comment, suggesting I use
-L/usr/lib/x86_64-linux-gnu -lX11 instead. This did work, and the application compiled without further issue!
Could anyone enlighten me as to what the difference is?