1

GCC Error:

relocation R_X86_64_32S against `ebx' can not be used when making a shared object; recompile with -fPIC 

Even when I made sure the -fPIC flag is set.

3 Answers 3

1

If you're trying to compile a file that includes inline assembly, make sure you're not missing a % sign before a register.

Sign up to request clarification or add additional context in comments.

Comments

0

Make sure to use -fPIC on the linker line. Sometimes templates get compiled by the linker.

Comments

0

That error message should say "without -fPIC".

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.