So I've put on my Amiga dev cap again and I am trying to figure out if it's possible to create a shared library of functions that I'll reuse using only C. As far as my compiler options go, I currently have Storm C V3.0 (from the ADCD_2.1 CD) and SAS C/6.50.
If I wanted to create a shared library called test.library that exposed a single void tb_hello() function that printed "Hello Amiga" to stdout using something like printf() or puts() what do I have to do?
I expect the usage would be something like:
#include
#include
#include "libs/test.h"
int main(int argc, char **argv) {
struct Library *TestBase = (struct Library*)OpenLibrary("test.library",0);
if (TestBase) {
tb_hello();
CloseLibrary(TestBase);
}
return 0;
}
If I am totally out of my league with this or I should just be using a link library instead, please let me know. My C is rusty and my Amiga C is even rustier.