Hello,
I appear to be a bit stuck so I'll go out on a limb here and reach out to the community for some assistance. I have a C file which has the following includes:
#include "SQFuncs.h"
#include <stdio.h>
#include <stdlib.h>
Because of the last stdlib.h header which is shared library available on all major platforms and importantly adds the int system(..) function which is the purpose of the module.
The issue I am running into is the shared library doesn't get utilized properly on Linux and causes the server to error. While on Windows the code complies and executes efficiently.
I have the following Makefile used to build the .so file for Linux.
SDK_objs = SQMain.o SQFuncs.o
CXX = gcc -fPIC -g
CXXFLAGS = -O2 -DNDEBUG -I.
all: lu_exec.so
default: all
lu_exec.so: $(SDK_objs)
$(CXX) -o $@ $(SDK_objs) -shared -s
SQMain.o: SQMain.c SQMain.h SQFuncs.h
$(CXX) $(CXXFLAGS) -c SQMain.c -o $@
SQFuncs.o: SQFuncs.c SQFuncs.h
$(CXX) $(CXXFLAGS) -c SQFuncs.c -o $@
clean:
rm -f $(SDK_objs)
There error the server throws is a generic error which holds no use.
Any advice or support is appreciated.