Hi,
On 26 October 2017 at 16:05, Paolo Galizzi <
paolof....@gmail.com> wrote:
> int testlib(int a){
> return a;
> }
On Windows, this is not enough to make the function exported from the
DLL. In other words, whereas on POSIX systems all non-static
functions are exported by shared libraries (by default), it does not
work like this on Windows. You need either to use a .def file, or say
in the C source:
__declspec(dllexport) int testlib(int a) {
return a;
}
You can also look up cffi/_embedding.h, which defines the macro
"CFFI_DLLEXPORT"; I know you're not doing embedding (and the problem
is completely independent of CFFI) but you might want to write
something similar to these seven lines of code in your own C library,
for portability.
A bientôt,
Armin.