[HELP]Creating a Lib

09/01/2013 17:02 miguelmig#1
I'm trying to create a lib to add functions to the game
But when I run the core, on the autorun.log it shows
Code:
./libgame2.so: unsupported file layout
If anyone could send me a shell script or something to compile it, I would appreciate


I'm using vrunner to add the LD_32_PRELOAD

Thanks
09/01/2013 18:18 Tyrar#2
How do you compile (and link) your lib?
09/01/2013 19:30 miguelmig#3
I type the g++ commands in the putty

Compiling Command ( example ):
Code:
g++48 -fexceptions  -std=c++11 -Wall -fPIC -I/home/lib -c /home/lib/main.cpp -o /home/lib/obj/Release/main.o
Linking Command:
Code:
g++48 -o /home/lib/bin/libgame.so /home/lib/obj/Release/main.o -shared -lpthread -Wl,-soname=libgame.so -pthread -lz -lm -I/usr/local/include -L/usr/local/lib
09/01/2013 21:58 Tyrar#4
Try this:
Code:
g++48 -fexceptions  -std=c++11 -Wall -fPIC -I/home/lib -c /home/lib/main.cpp -o /home/lib/obj/Release/main.o -m32
and
Code:
g++48 -o /home/lib/bin/libgame.so /home/lib/obj/Release/main.o -shared -lpthread -Wl,-soname=libgame.so -pthread -lz -lm -I/usr/local/include -L/usr/local/lib -m32
09/01/2013 23:04 miguelmig#5
I get this error when it reaches the part of #include <algorithm>
Code:
/usr/local/lib/gcc48/include/c++/bits/random.h:106:26: error: expected unqualified-id before '__int128'
       { typedef unsigned __int128 type; };
09/01/2013 23:22 Tyrar#6
Code:
typedef struct { int64_t[2] m; } int128_t, _int128_t, __int128_t, int128, _int128, __int128;
09/01/2013 23:31 miguelmig#7
Code:
error: expected unqualified-id before '__int128'
 typedef struct { int64_t[2] m; } int128_t, _int128_t, __int128_t, int128, _int128, __int128;
09/01/2013 23:32 Tyrar#8
Just include the libs you need. Why do you need 128bit integers?
09/01/2013 23:36 miguelmig#9
I don't, it's included by boost/unordered_set. I'm using LibM2 by iMer

EDIT: Shouldn't I use the LD_PRELOAD and/or m64 because it's a amd x86-64 architeture