McCode icon indicating copy to clipboard operation
McCode copied to clipboard

MCPL compilation issue on Windows with current GCC/Strawberry Perl

Open willend opened this issue 2 years ago • 1 comments

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

willend avatar Apr 04 '22 12:04 willend

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

willend avatar Apr 05 '22 09:04 willend