Windows-on-ARM-Experiments / mingw-woarm64-build

Workflows and build scripts for Windows on Arm64 GNU cross-compiler for `aarch64-w64-mingw32` target.
GNU General Public License v2.0
32 stars 4 forks source link

`-shared` option produces invalid binaries #214

Open Blackhex opened 1 week ago

Blackhex commented 1 week ago

Building even the simplest code:

int main() {
    return 0;
}

with

aarch64-w64-mingw32-gcc shared.c -o no-shared.exe
aarch64-w64-mingw32-gcc -shared shared.c -o shared.exe
./no-shared.exe
./shared.exe

fails to execute the binary compiled with -shared

./shared.exe: Invalid argument

DependenciesGui does not show any particular DLL missing though the shared binary depends on fewer system libraries.