ebitengine / purego

Apache License 2.0
1.95k stars 63 forks source link

Fix issue 189 #197

Closed TotallyGamerJet closed 5 months ago

TotallyGamerJet commented 5 months ago

Use the standard Cgo import mechanism when CGO_ENABLED=1. This fixes an issue where sometimes the external linker would fail to add the dlfcn symbols causing a linker error.

Closes #189

TotallyGamerJet commented 5 months ago

Once this gets merged I think it would be best to reorganize all files into internal/cgo and internal/nocgo so that the assembly and C files can have a clear distinction

TotallyGamerJet commented 5 months ago

I added a buildtest file. The GitHub workflow runs go build -v ./... which before this PR failed but with this PR works.

hajimehoshi commented 5 months ago

Should we cherry-pick this to 0.5?

What do you think? (I think yes)

TotallyGamerJet commented 5 months ago

Should we cherry-pick this to 0.5?

What do you think? (I think yes)

As long as there are no merge conflicts I think so too.