SA-MP Forums Archive
Compiling plugin with mingw - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Compiling plugin with mingw (/showthread.php?tid=596758)



Compiling plugin with mingw - graef - 22.12.2015

When i compiling my plugin to .so, it gave me error "Can't figure computer byte order (__BYTE_ORDER macro not found)"

This is my makefile ( Copy from YSF )
Код:
INC = -I./inc -I./inc/amx -I./inc/sampgdk -I./src
OBJ = -L./lib -llibsampgdk.so -llibsampgdk.so.4 -llibsampgdk.so.4.4.0
GPP = g++ -m32 -std=c++11 -Ilib -fno-stack-protector
GCC = gcc -m32 -std=c++11 -Ilib -fno-stack-protector
YSF_OUTFILE = "./a_core.so"

COMPILE_FLAGS = -c -O3 -fpack-struct=1 -fPIC -w -DLINUX

YSF = -D YSF $(COMPILE_FLAGS)

all: YSF

clean:
	-rm -f *~ *.o *.so

YSF: clean
	$(GPP) $(YSF) $(OBJ) $(INC) ./src/framework/player/*.cpp
	$(GPP) $(YSF) $(OBJ) $(INC) ./src/framework/server/*.cpp
	$(GPP) $(YSF) $(OBJ) $(INC) ./src/framework/xml/*.cpp
	$(GCC) -nodefaultlibs -fshort-wchar -shared -o $(YSF_OUTFILE) *.o