Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

an error when run 'make' #4

Open
xyecoding opened this issue Mar 1, 2020 · 0 comments
Open

an error when run 'make' #4

xyecoding opened this issue Mar 1, 2020 · 0 comments

Comments

@xyecoding
Copy link

xyecoding commented Mar 1, 2020

image

g++ -fPIC -g -std=c++11 -c main.cpp g++ -fPIC -g -std=c++11 -c ./test/listTest.cpp g++ -fPIC -g -std=c++11 -c ./test/vectorTest.cpp g++ -fPIC -g -std=c++11 -c alloc.cpp g++ -fPIC -g -std=c++11 -c ./test/dequeTest.cpp g++ -fPIC -g -std=c++11 -c ./test/heapTest.cpp g++ -fPIC -g -std=c++11 -c ./test/rbtreeTest.cpp g++ -fPIC -g -std=c++11 -c ./test/setTest.cpp g++ -g -std=c++11 main.o listTest.o vectorTest.o alloc.o dequeTest.o heapTest.o rbtreeTest.o setTest.o mapTest.o -o stl /usr/bin/ld: mapTest.o: relocation R_X86_64_32 against .rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: 最后的链结失败: 输出不可表示的节
collect2: error: ld returned 1 exit status
makefile:2: recipe for target 'stl' failed
make: *** [stl] Error 1
`

But I have already added -fPIC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant