I installed cLion and MinWG on windows 10, and replicated the hello example (https://www.swi-prolog.org/pldoc/man?section=shlib).
When running: swipl-ld -o library
I get an error:
undefined reference to `WinMain@16’
collect2.exe: error: ld returned 1 exit status
gcc.exe returned code 1
*** swipl-ld exit status 1
Just compiling it in cLion works without error.
According to stackoverflow i may be missing an entry point recognized by windows, but i create this project as a library.
any thoughts are much appreciated,