McCode
McCode copied to clipboard
MCPL compilation issue on Windows with current GCC/Strawberry Perl
e.g. with Test_MCPL_input and McStas 3.1
C:/mcstas-3.1/lib/tools/Python/mcrun/../mccodelib/../../../libs/mcpl/libmcpl.a(mcpl.c.obj):mcpl.c:(.text+0x75): undefined reference to `__imp___acrt_iob_func'
collect2.exe: error: ld returned 1 exit status
Workaround found (may require editing filesystem permissions for current user)
- In your McStas environment shell, please install a conda-based gcc:
-
conda install m2w64-gcc
- cd to the location of your MCPL library, e.g. c:\mcstas-3.1\lib\libs\mcpl
- Delete the existing mcpl.o and libmcpl.a files
- Run the compile.bat script