I am trying to compile this app using its makefile on WSL. But I get the following error:
g++ -g -Wall -ansi pendulumSystem.o TimeStepper.o particleSystem.o ClothSystem.o simpleSystem.o camera.o main.o vecmath/src/Vector3f.o vecmath/src/Vector2f.o vecmath/src/Matrix3f.o vecmath/src/Matrix4f.o vecmath/src/Vector4f.o vecmath/src/Quat4f.o vecmath/src/Matrix2f.o -o a3 -L. -lRK4 -lglut -lGL -lGLU /usr/bin/ld: ./libRK4.a(RK4.o): relocation R_X86_64_32 against symbol `[email protected]@CXXABI_1.3' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: ./libRK4.a(RK4.o): relocation R_X86_64_PC32 against symbol `[email protected]@GLIBCXX_3.4' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status make: *** [Makefile:15: a3] Error 1
I tried editing my makefile to include the flag like below, but it still gives me the same error message.
INCFLAGS = -I vecmath/include INCFLAGS += -I /usr/include/GL LINKFLAGS = -L. -lRK4 -lglut -lGL -lGLU CFLAGS = -g -Wall -ansi -fPIE CC = g++ SRCS =(wildcard vecmath/src/*.cpp) OBJS =
(SRCS)
(PROG):
(CC)
(OBJS) -o
(LINKFLAGS) .cpp.o:
(CFLAGS)
@
(INCFLAGS) -Y
(OBJS) $(PROG)
Could it be that the provided
libRK4.a
-fPIE
Anonymous Asked question May 13, 2021
Recent Comments