Build Calculix2.6.1 in Mingw64

There is detailed description here http://mechanicalhacks.wordpress.com/2011/03/29/building-calculix-to-run-native-on-64-bit-windows/. But it doesnot works well, at least for ccx2.6.1. Here are some complemetation

1. Build  ARPACK.
    Modify ARmake.inc at follows
1) home="your current ARPACK home";
2) PLAT=anything you like. It would be appended in your library name.
3) Change the DIRS as
     DIRS = $(UTILdir)  $(SRCdir)
4) Make sure file second.f, which would in standard LAPACK library, in folder UTIL is not in your compile list.
5) RANLIB  = touch

2. Build spooles
   Following modifictions
1) Modify line 9 of SPOOLES.2.2/Tree/src/MakeGlobalLib from drawTree.c to draw.c
2) Modify line 204 of SPOOLES.2.2/MT/src/QRfactorMT.c from
   tids[myid]=0;
to memset(&tids[myid], 0, sizeof(pthread_t) );
3) Modify Make.inc
  THREAD_LIBS= -lpthread
4) Modify makefile
  uncomment
  #  cd MT               ; make lib
in make lib option

3. Build Calculix
1) Add #include "pthread.h" into file CalculiX.h
2) Modify Makefile as follows
  ・ Indicate where library of spooles, ARAPCK, BLAS and Lapack in in include in your LIBS, just like

DIR=../../../../solver/SPOOLES.2.2
BLASDIR = ../../../../solver/lapack-3.4.2
LIBDIR=/c/mingw64/x86_64-w64-mingw32/lib


LIBS = \
    $(DIR)/MT/src/spoolesMT.a \
       $(DIR)/spooles.a \
       ../../../../solver/ARPACK/libarpack_WIN64.a \
    $(BLASDIR)/liblapack.a $(BLASDIR)/librefblas.a \
       $(LIBDIR)/libpthread.a \
       $(LIBDIR)/libm.a


 Then just make it. That's all!


 


没有评论:

发表评论

VS Code下cmake, c++编译,调试环境的构成步骤

1   下载必须extension      按[Ctrl+Shift+X]打开extension窗口,选择安装"C/C++", "CMake", "CMake Tools" 2   在VSCode下打开作业目录 ...