error: ld returned 1 exit status
sub :- error: ld returned 1 exit status
hi to all, I've centos7.5 and codeblocks17.12 in VM. I am building a simple shared library file. but having following problem:- header file:- ------------- singlyll.h Code:
#ifndef SINGLYLL_H_INCLUDED --------------------- singlyll.cpp Code:
#include "singlyll.h" build message :- Code:
error: ld returned 1 exit status Code:
g++ -shared obj/Debug/singlyll.o -o bin/Debug/libsinglyll.so |
your second line gives you a BIG Clue
Code:
/usr/bin/ld: obj/Debug/singlyll.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC vector why not use that instead. just an idea. |
i didn't get your point. please tell me how to do it in CodeBlocks.
Quote:
|
Compiler Settings
Other Options add this: -fPIC |
1 Attachment(s)
|
what are you doing exactly? I did this,
link.h Code:
#ifndef LINKKY_H_INCLUDED Code:
#include<iostream> i found this on a very similar error you're getting. https://stackoverflow.com/questions/...str1-8-can-not |
You might want to do a 'Build All' or 'Rebuild' or 'Clean and Build' or anyhow it is called.
|
thank you very much friend,. I did as you told and I got solution.
|
All times are GMT -5. The time now is 03:09 AM. |