Add -Wl,-no-as-needed to Linux Makefile.
GCC's linker drops dependency on libGL because neither MuJoCo, GLFW, nor the sample applications themselves explicitly depend on OpenGL symbols. PiperOrigin-RevId: 439372170 Change-Id: I122d1d9658484e901f422d35395ad5929c7a9021
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
# which is commonly available through your distro's package manager.
|
||||
# On Debian and Ubuntu, GLFW can be installed via `apt install libglfw3-dev`.
|
||||
|
||||
COMMON=-O2 -I../include -L../lib -std=c++11 -pthread -Wl,-rpath,'$$ORIGIN'/../lib
|
||||
COMMON=-O2 -I../include -L../lib -std=c++11 -pthread -Wl,-no-as-needed -Wl,-rpath,'$$ORIGIN'/../lib
|
||||
|
||||
all:
|
||||
$(CXX) $(COMMON) testxml.cc -lmujoco -o ../bin/testxml
|
||||
|
||||
Reference in New Issue
Block a user