--- a/Makefile_mingw_i8
+++ b/Makefile_mingw_i8
@@ -0,0 +1,44 @@
+#Specify where to store the generated .o files
+OBJDIR = ccx_i8
+
+CFLAGS += -DARCH="Linux" -DARPACK -DMATRIXSTORAGE -DUSE_MT=1 -DNETWORKOUT -DCALCULIX_EXTERNAL_BEHAVIOURS_SUPPORT -fcommon
+
+CFLAGS += -DINTSIZE64
+FFLAGS += -fdefault-integer-8
+
+#SPOOLES
+CFLAGS+= -I ${MINGW_PREFIX}/include/spooles -DSPOOLES
+
+CC=CC
+FC=FC
+
+#Source files in this folder and in the adapter directory
+$(OBJDIR)/%.o : %.c
+	$(CC) $(CFLAGS) -c $< -o $@
+$(OBJDIR)/%.o : %.f
+	$(FC) $(FFLAGS) -c $< -o $@
+
+include Makefile.inc
+
+SCCXMAIN = ccx_$(CCX_VERSION).c
+
+OCCXF = $(SCCXF:%.f=$(OBJDIR)/%.o)
+OCCXC = $(SCCXC:%.c=$(OBJDIR)/%.o)
+OCCXMAIN = $(SCCXMAIN:%.c=$(OBJDIR)/%.o)
+
+LDFLAGS = -lspoolesMT -lspooles
+
+$(OBJDIR)/$(OBJDIR).exe: $(OBJDIR) $(OCCXMAIN) $(OBJDIR)/ccx_$(CCX_VERSION).a
+	 ./date.pl; $(CC) $(CFLAGS) -c $(SCCXMAIN);
+	 $(FC) $(FFLAGS) \
+	 -o $@ $(OCCXMAIN) $(OBJDIR)/ccx_$(CCX_VERSION).a \
+	 -lpthread $(OMP_LIBS) -larpack_64 -lopenblas_64 $(LDFLAGS)
+
+$(OBJDIR)/ccx_$(CCX_VERSION).a: $(OCCXF) $(OCCXC)
+	ar vr $@ $?
+
+$(OBJDIR):
+	mkdir -p $(OBJDIR)
+
+clean:
+	rm -f $(OBJDIR)/*.o $(OBJDIR)/ccx_$(CCX_VERSION).a $(OBJDIR)/ccx_$(OBJDIR).exe
--- a/Makefile_mingw_i4
+++ b/Makefile_mingw_i4
@@ -0,0 +1,44 @@
+#Specify where to store the generated .o files
+OBJDIR = ccx_i4
+
+CFLAGS += -DARCH="Linux" -DARPACK -DMATRIXSTORAGE -DUSE_MT=1 -DNETWORKOUT -DCALCULIX_EXTERNAL_BEHAVIOURS_SUPPORT -DPASTIX -DPASTIX_FP32 -DPASTIX_GPU -fcommon
+
+#StarPu
+CFLAGS +=$(shell pkg-config --cflags libstarpu)
+#SPOOLES
+CFLAGS += -I ${MINGW_PREFIX}/include/spooles -DSPOOLES
+
+CC=CC
+FC=FC
+
+#Source files in this folder and in the adapter directory
+$(OBJDIR)/%.o : %.c
+	$(CC) $(CFLAGS) -c $< -o $@
+$(OBJDIR)/%.o : %.f
+	$(FC) $(FFLAGS) -c $< -o $@
+
+include Makefile.inc
+
+SCCXMAIN = ccx_$(CCX_VERSION).c
+
+OCCXF = $(SCCXF:%.f=$(OBJDIR)/%.o)
+OCCXC = $(SCCXC:%.c=$(OBJDIR)/%.o)
+OCCXMAIN = $(SCCXMAIN:%.c=$(OBJDIR)/%.o)
+
+LDFLAGS = -lspoolesMT -lspooles
+LDFLAGS += $(shell pkg-config --libs pastix metis libstarpu hwloc scotch)
+
+$(OBJDIR)/$(OBJDIR).exe: $(OBJDIR) $(OCCXMAIN) $(OBJDIR)/ccx_$(CCX_VERSION).a
+	 ./date.pl; $(CC) $(CFLAGS) -c $(SCCXMAIN);
+	 $(FC) $(FFLAGS) \
+	 -o $@ $(OCCXMAIN) $(OBJDIR)/ccx_$(CCX_VERSION).a \
+	 -lpthread $(OMP_LIBS) -larpack -lopenblas $(LDFLAGS)
+
+$(OBJDIR)/ccx_$(CCX_VERSION).a: $(OCCXF) $(OCCXC)
+	ar vr $@ $?
+
+$(OBJDIR):
+	mkdir -p $(OBJDIR)
+
+clean:
+	rm -f $(OBJDIR)/*.o $(OBJDIR)/ccx_$(CCX_VERSION).a $(OBJDIR)/ccx_$(OBJDIR).exe
--- a/ccx_2.22.c
+++ b/ccx_2.22.c
@@ -15,10 +15,6 @@
 /*     along with this program; if not, write to the Free Software       */
 /*     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.         */
 
-#ifdef __WIN32
-_set_output_format(_TWO_DIGIT_EXPONENT);
-#endif
-
 #ifdef CALCULIX_MPI
 #include <spoolesMPI.h>
 #endif
@@ -37,6 +33,10 @@
 
 int main(int argc,char *argv[])
 {
+	
+#if defined(_WIN32) && !defined(_UCRT)
+_set_output_format(_TWO_DIGIT_EXPONENT);
+#endif
   
   FILE *f1;
     
--- a/ccx_2.22step.c
+++ b/ccx_2.22step.c
@@ -15,10 +15,6 @@
 /*     along with this program; if not, write to the Free Software       */
 /*     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.         */
 
-#ifdef __WIN32
-_set_output_format(_TWO_DIGIT_EXPONENT);
-#endif
-
 #ifdef CALCULIX_MPI
 #include <spoolesMPI.h>
 #endif
@@ -44,6 +40,10 @@
                   ITG *inputsteps,ITG *iperturb,ITG *irstrt,char **filabp,
                   ITG *nlabel)
 {
+	
+#if defined(_WIN32) && !defined(_UCRT)
+_set_output_format(_TWO_DIGIT_EXPONENT);
+#endif
 
   /* in FORTRAN convention:
 
--- a/restartwrite.f
+++ b/restartwrite.f
@@ -114,7 +114,7 @@
 !     
 !     check whether the restart file exists and is opened
 !     
-         call system("rm -f temporaryrestartfile")
+         call execute_command_line("rm -f temporaryrestartfile")
 !     
          open(15,file="temporaryrestartfile",ACCESS='SEQUENTIAL',
      &        FORM='UNFORMATTED',err=151)
--- a/writeobj.f
+++ b/writeobj.f
@@ -55,7 +55,7 @@
       dd=0.d0
       do j=1,ndesi
          inode=nodedesi(j)
-         dd=dd+dgdxglob(1,inode,i)**2
+         dd=dd+dgdxglob(1,INT(inode),i)**2
       enddo
       dd=dsqrt(dd)
       write(5,'(3x,a16,e14.7,3x,e16.7,3x,a80)') objectset(1,i),g0(i),
