RosettaCodeData/Task/Call-a-function-in-a-shared-library/Go/call-a-function-in-a-shared-library-1.go

9 lines
210 B
Go
Raw Permalink Normal View History

2020-02-17 23:21:07 -08:00
#include <stdio.h>
/* gcc -shared -fPIC -nostartfiles fakeimglib.c -o fakeimglib.so */
int openimage(const char *s)
{
static int handle = 100;
fprintf(stderr, "opening %s\n", s);
return handle++;
}