ebitengine / purego

Apache License 2.0
2.16k stars 68 forks source link

can not use from windows #136

Closed calvin2021y closed 1 year ago

calvin2021y commented 1 year ago

I use v0.4.0-alpha.4 for windows, the openLibrary from example is not public.

Is there a unite public library load method ?

TotallyGamerJet commented 1 year ago

The recommended solution is to copy the implementation of openLibrary for windows in the example.

See #107 for an explanation as to why there is no cross platform version of Dlopen provided by purego

calvin2021y commented 1 year ago

thanks for the tips. one more question about the windows:

RegisterFunc takes a pointer to a Go function representing the calling convention of the C function.

this mean RegisterFunc only accept extern "C" calling convention, right ?

TotallyGamerJet commented 1 year ago

Yes purego can only call C ABI functions.