PDA

View Full Version : Compile Raknet libs



Pierrick584
February 18th, 2012, 07:55 PM
Greetings, i have been trying to build the Raknet 4.036 library from source (they only distribute sources)

From their readme, they recommand a g++ command, and a cmake, both doesnt work, tried to add the source directory in a codeblock project, give me tons of warning, no error, no binary output :( Anyone got suggestion? (if anyone happend to have the lib, just sending me the binary would be awesome too)

Pierrick584
February 19th, 2012, 07:44 PM
Bump... Still having issue.
to add some details, i have google'd a bit about compiling shared library with g++, seems like it involve a -shared argument (maybe more procedure that i missed)

So i tried to add this to their command

pierrick@pcroom-linux:~/Desktop/raknet/Source$ g++ -shared -m64 -pthread -g *.cpp
/usr/bin/ld: /tmp/ccZs6BZZ.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/tmp/ccZs6BZZ.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
pierrick@pcroom-linux:~/Desktop/raknet/Source$ g++ -shared -pthread -g *.cpp/usr/bin/ld: /tmp/ccGrBMi9.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/tmp/ccGrBMi9.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
pierrick@pcroom-linux:~/Desktop/raknet/Source$ g++ -shared -pthread -g *.cpp^C
pierrick@pcroom-linux:~/Desktop/raknet/Source$ g++ -shared -m64 -lpthread -g *.cpp
/usr/bin/ld: /tmp/ccKi20UM.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/tmp/ccKi20UM.o: could not read symbols: Bad value
collect2: ld returned 1 exit status

Bachstelze
February 20th, 2012, 05:38 AM
We can't readily download this software, so can you at least post the readme? You probably shouldn't run g++ directly.