Skip to content

Commit 0d5d1f5

Browse files
committed
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
1 parent 90dea1b commit 0d5d1f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sample/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# which is commonly available through your distro's package manager.
33
# On Debian and Ubuntu, GLFW can be installed via `apt install libglfw3-dev`.
44

5-
COMMON=-O2 -I../include -L../lib -std=c++11 -pthread -Wl,-rpath,'$$ORIGIN'/../lib
5+
COMMON=-O2 -I../include -L../lib -std=c++11 -pthread -Wl,-no-as-needed -Wl,-rpath,'$$ORIGIN'/../lib
66

77
all:
88
$(CXX) $(COMMON) testxml.cc -lmujoco -o ../bin/testxml

0 commit comments

Comments
 (0)