0 Members and 2 Guests are viewing this topic.
Well I've started working on it, but I've never compiled a library without the use of a build system that configured it to compile. I think I'm close, but still getting an error. Not sure if I should start a new thread, but I'll post it here for now :Code: [Select]/usr/bin/g++ -c "/home/spirro/C++Work/sfbl/sfbl.cpp" -g -O0 -std=c++11 -Wall -o ./Debug/sfbl.cpp.o -I. -I/usr/include -I/usr/local/include/usr/bin/g++ -shared -fPIC -o ./Debug/sfbl.so @"sfbl.txt" -L. -L/usr/lib/x86_64-linux-gnu -L/usr/local/lib -lsfml-graphics-d -lsfml-window-d -lsfml-system-d/usr/bin/ld: ./Debug/sfbl.cpp.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC./Debug/sfbl.cpp.o: error adding symbols: Bad valuecollect2: error: ld returned 1 exit statusmake[1]: *** [Debug/sfbl.so] Error 1make[1]: Leaving directory `/home/spirro/C++Work/sfbl'It tells me to recompile with -fPIC, but, as you can see, that -fPIC is in there. Now whether or not it's in the right place, I'm still unsure and checking.
/usr/bin/g++ -c "/home/spirro/C++Work/sfbl/sfbl.cpp" -g -O0 -std=c++11 -Wall -o ./Debug/sfbl.cpp.o -I. -I/usr/include -I/usr/local/include/usr/bin/g++ -shared -fPIC -o ./Debug/sfbl.so @"sfbl.txt" -L. -L/usr/lib/x86_64-linux-gnu -L/usr/local/lib -lsfml-graphics-d -lsfml-window-d -lsfml-system-d/usr/bin/ld: ./Debug/sfbl.cpp.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC./Debug/sfbl.cpp.o: error adding symbols: Bad valuecollect2: error: ld returned 1 exit statusmake[1]: *** [Debug/sfbl.so] Error 1make[1]: Leaving directory `/home/spirro/C++Work/sfbl'
try this solution:http://stackoverflow.com/questions/9541609/using-linux-c-shared-and-static-libraries-in-a-same-program
Quote from: Mj PsykOo on January 28, 2015, 11:02:44 pmtry this solution:http://stackoverflow.com/questions/9541609/using-linux-c-shared-and-static-libraries-in-a-same-programThanks, but afaik everything is dynamic other than the precompiled libs you provide. I'm just trying to make dynamic libs.
I think it's better to link it statically rather than dynamically for avoiding necessity of presence of compiled binary(.so).
Hello, i've found your awful library and i've integrated it in my game. It's a tile based game, but it's doing weird thing like the image i've attached. Is there a way to fix it ? Thanks
Awful, are you sure?