4 ms·
One thing he doesn't mention is "-fPIC", I've been bitten by this bug many times: "please re-compile with PIC enabled and try again"!
by shared4you 14y ago
One thing he doesn't mention is "-fPIC", I've been bitten by this bug many times: "please re-compile with PIC enabled and try again"!
- ansgri 14y agoIs there any reason that compilers don't somehow fix this thing by default?
- izacus 14y agoThey can't - you get this error when trying to link other objects, which are already compiled without position-independent code. So the linker can't really fix this. Also, if you're not doing dynamic linking, code without -fPIC is generally faster and for use-cases where C (and/or C++) is used that can make a difference.