gcc compilation problem
hi ,
I'm compiling a program nativelib.c but i sot following problems here is the command i used and result i got
COmmand:- root@ws40-
RESULT :-/usr/bin/ld: /usr/lib/
/usr/lib/
collect2: ld returned 1 exit status
when i remove the -static flag from compiler then i got the following error
Command :-root@
Result:
/tmp/ccTOK1y8.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
i tried with _FPIC flag than tha result is following
Command :root@ws40-
Result : /usr/bin/ld: /tmp/ccO4tElO.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/tmp/ccO4tElO.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
Can anyone tell what i'm doing wrong? what shoud i do to compile the pogram
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Manfred Hampl
- Solved:
- Last query:
- Last reply: