Hi!
I finally figured out how to compile the external xPerm executable
under Windows 10 and Mathematica 12.2.
Wolfram changed a number of things in the MathLink compiler
addition files since the last compilation, so it became a little
bit more difficult.
If you would like to try it yourself, which I hope you don't need
to, you can try the following.
1) Download and install the mingw-64 compiler. I used the x86_64,
win32, seh, rt_v6, rev0 settings during installation, but you can
probably try other settings.
2) Make a make_xperm.bat file with the content with appropriate
version numbers and directories
"
@Echo off
set mingwVer=8.1.0
set mmaVer=12.2
set GccBinDir="C:\Program
Files\mingw-w64\x86_64-%mingwVer%-win32-seh-rt_v6-rev0\mingw64\bin"
set mldev64Dir="C:\Program Files\Wolfram
Research\Mathematica\%mmaVer%\SystemFiles\Links\MathLink\DeveloperKit\Windows-x86-64\CompilerAdditions"
set ml64Ver=4
set mllibName=ml64i%ml64Ver%
If Not Exist %mllibName%n.lib (Echo %mllibName%n.lib not found.
Creating it... && %GccBinDir%\gendef
%mldev64Dir%\..\SystemAdditions\%mllibName%.dll &&
%GccBinDir%\dlltool.exe --as-flags=--64 -m i386:x86-64 -k
--input-def %mllibName%.def --output-lib
%mllibName%n.lib&& del %mllibName%.def)
Echo Running mprep...
%mldev64Dir%\mprep -o xpermtm.c
xperm.tm
Echo Compiling...
%GccBinDir%\gcc -c -O3 -static-libgcc -include "stdint.h"
-I%mldev64Dir% xpermtm.c
Echo Linking...
%GccBinDir%\gcc -mwindows -O3 -I%mldev64Dir% xpermtm.o -L%CD%
-l%mllibName%n -o xperm.win64
Echo Removing temporary files...
del xpermtm.o
del xpermtm.c
"
3) Place the file in the same folder as xperm.c i.e.
\xAct\xPerm\mathlink, and execute the bat file.
The new compiled executables should be available from
xact.es
soon, so most users should not need to compile them, but I wanted
to post this for future reference.
Regards
Thomas