I am accessing the dll using the call() proc.
The main reason I am trying .so, is because my .dll didn't work on the Unix machine. But, even though I tried to make a .so, it still gives me "runtime error: Unable to load library nature.so". I am completely sure I am loading the game in Trusted Mode.
I am accessing the Unix machine over a network through the internet. I am not sure if the probelm is because it is over the internet, or because I did not compile the .so file correctly.
The C code is as follows:
#include <stdio.h>
#include <stdlib.h>
extern char *nature(int argc, char **argv)
{
static char text[3] = "1";
if (argc == 2)
{
static unsigned int pv1, pv2, nature;
pv1 = (unsigned int) atoi(argv[0]);
pv2 = (unsigned int) atoi(argv[1]);
nature = (pv1 | (pv2 << 16U)) % 25U + 1U;
sprintf(text, "%u", nature);
}
else
fprintf(stderr, "Wrong number of arguments for nature function!\n");
return text;
}
I compiled it using the following command lines:
gcc -c -fpic nature.c
gcc -shared -lc -o nature.so nature.o
Am I compiling it right? What could be wrong?
I imagine LummoxJR might know what's wrong?
Edit: I'm having a few issues myself, and I'm fairly sure it's not your code.