Как перенести код с помощью sys / ioctl.h на MinGW g cc? - PullRequest
0 голосов
/ 04 апреля 2020

Мои коды (https://github.com/fangq/mmc, https://github.com/fangq/mcxcl) были скомпилированы из коробки с использованием g cc на Linux & Ma c, cygwin -g cc или msys2-g cc на Windows, но не с компиляторами MinGW (x86-64-mingw64-* компиляторы для cygwin64, msys2, mingw64 или TDM-G CC или поддержка matlab mingw64 (mingw64 g cc 4.9.6) ), поскольку он жалуется, что пропускает набор файлов заголовков (sys/ioctl.h, ieee754.h et c), поэтому я включил копию этих файлов заголовков в свой исходный код и добавил -I./mingw64/include, чтобы большинство из них компилировалось

https://github.com/fangq/mmc/tree/master/src/mingw64/include

однако при компиляции mex-файла matlab с использованием этот скрипт на MATLAB R2016 / 2018 я получил следующую ошибку

Error using mex
mcx_utils.o: In function `mcx_progressbar':
D:/Users/fangq/Gitroot/Project/mmc/src/mcx_utils.c:1054: undefined reference to `ioctl'
collect2.exe: error: ld returned 1 exit status

Мне интересно, почему компиляция внутри matlab и вне matlab различна. Есть ли библиотека, на которую я могу ссылаться, чтобы исправить ошибку undefined reference to "ioctl"?

Вот журнал при компиляции с использованием g cc на msys2:

fangq@zen:~/space/git/Project/mmc/src$ make mex
Building built/xorshift128p_rand.o
cc -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp   -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -I../src -I"./mingw64/include" -o built/xorshift128p_rand.o  xorshift128p_rand.c
Building built/simpmesh.o
cc -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp   -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -I../src -I"./mingw64/include" -o built/simpmesh.o  simpmesh.c
Building built/tettracing.o
cc -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp   -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -I../src -I"./mingw64/include" -o built/tettracing.o  tettracing.c
Building built/mcx_utils.o
cc -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp   -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -I../src -I"./mingw64/include" -o built/mcx_utils.o  mcx_utils.c
Building built/tictoc.o
cc -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp   -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -I../src -I"./mingw64/include" -o built/tictoc.o  tictoc.c
Building built/mmc.o
cc -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp   -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -I../src -I"./mingw64/include" -o built/mmc.o  mmc.c
Building built/cjson/cJSON.o
cc -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp   -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -I../src -I"./mingw64/include" -o built/cjson/cJSON.o  cjson/cJSON.c
Building built/mmc_host.o
cc -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp   -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -I../src -I"./mingw64/include" -o built/mmc_host.o  mmc_host.c
Building built/highordermesh.o
g++ -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp   -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -I../src -I"./mingw64/include" -o built/highordermesh.o  highordermesh.cpp
Building built/mmc_cl_utils.o
cc -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp   -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -I../src -I"./mingw64/include" -o built/mmc_cl_utils.o  mmc_cl_utils.c
Building built/mmc_cl_host.o
cc -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp   -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -I../src -I"./mingw64/include" -o built/mmc_cl_host.o  mmc_cl_host.c
Building bin/mmc
cmd //c mex.bat   -v -f mexopts_msys2_gcc.xml COMPFLAGS='$COMPFLAGS -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp   -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT' LDFLAGS='$LDFLAGS -static -fopenmp "c:\Windows\System32\OpenCL.dll" -fopenmp'  -outdir ../mmclab mmclab.cpp -I../src -I"./mingw64/include" -output bin/mmc built/xorshift128p_rand.o built/simpmesh.o built/tettracing.o built/mcx_utils.o built/tictoc.o built/mmc.o built/cjson/cJSON.o built/mmc_host.o built/highordermesh.o built/mmc_cl_utils.o built/mmc_cl_host.o
Verbose mode is on.
... Looking for compiler 'MinGW64 Compiler (C++)' ...
... Looking for environment variable 'MW_MINGW64_LOC' ...Yes ('C:/msys64/usr/').
... Looking for file 'C:\msys64\usr\bin\g++.exe' ...Yes.
... Looking for folder 'C:\msys64\usr' ...Yes.
... Looking for environment variable 'MW_MINGW64_LOC' ...Yes ('C:/msys64/usr/').
... Executing command 'C:\msys64\usr\bin\g++ -dumpmachine' ...Yes ('x86_64-pc-msys').
Found installed compiler 'MinGW64 Compiler (C++)'.
Set PATH = C:\msys64\usr\bin;C:\Program Files\MATLAB\R2018a\extern\include\win64;C:\Program Files\MATLAB\R2018a\extern\include;C:\Program Files\MATLAB\R2018a\simulink\include;C:\Program Files\MATLAB\R2018a\lib\win64;.;C:\msys64\opt\local\bin;C:\msys64\usr\local\cuda\bin\;.;C:\msys64\pub\bin;C:\msys64\pub\pgi\linux86-64\18.4\bin;C:\msys64\mingw64\bin;C:\msys64\usr\local\bin;C:\msys64\usr\bin;C:\msys64\usr\bin;C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\msys64\usr\bin\site_perl;C:\msys64\usr\bin\vendor_perl;C:\msys64\usr\bin\core_perl;C:\msys64\usr\local\bin;C:\msys64\home\users\fangq\space\Download\MCXStudio;C;C:\Program Files\MATLAB\R2018a\bin;C:\msys64\usr\lib\gcc\x86_64-pc-msys\9.3.0\
Set INCLUDE = C:\msys64\usr\include;C:\msys64\usr\x86_64-pc-msys\include\c++;C:\msys64\usr\x86_64-pc-msys\include;C:\msys64\usr\x86_64-pc-msys\include\c++\x86_64-pc-msys;C:\msys64\usr\x86_64-pc-msys\include\c++\backward;
Set LIB = C:\msys64\usr\lib;;
Set MW_TARGET_ARCH = win64;
Set LIBPATH = C:\Program Files\MATLAB\R2018a\extern\lib\win64;
Options file details
-------------------------------------------------------------------
        Compiler location: C:\msys64\usr
        Options file: C:\msys64\home\fangq\space\git\Project\mmc\src\mexopts_msys2_gcc.xml
        CMDLINE2 : C:\msys64\usr\bin\g++ -m64 -Wl,--no-undefined -static -fopenmp "c:\Windows\System32\OpenCL.dll" -fopenmp -shared -static -s -Wl,"C:\Program Files\MATLAB\R2018a/extern/lib/win64/mingw64/exportsmexfileversion.def" C:\msys64\tmp\mex_1481040925092289_7396\mmclab.obj C:\msys64\tmp\mex_1481040925092289_7396\cpp_mexapi_version.obj "built/xorshift128p_rand.o" "built/simpmesh.o" "built/tettracing.o" "built/mcx_utils.o" "built/tictoc.o" "built/mmc.o" "built/cjson/cJSON.o" "built/mmc_host.o" "built/highordermesh.o" "built/mmc_cl_utils.o" "built/mmc_cl_host.o"  -L"C:\Program Files\MATLAB\R2018a\extern\lib\win64\mingw64" -llibmx -llibmex -llibmat -o C:\msys64\home\fangq\space\git\Project\mmc\mmclab\mmc.mexw64
        CXX : C:\msys64\usr\bin\g++
        COMPILER : C:\msys64\usr\bin\g++
        DEFINES : -DMATLAB_DEFAULT_RELEASE=R2017b  -DUSE_MEX_CMD   -m64 -DMATLAB_MEX_FILE
        MATLABMEX : -DMATLAB_MEX_FILE
        CFLAGS :  -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp   -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -fexceptions -fno-omit-frame-pointer
        CXXFLAGS :  -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp   -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -fexceptions -fno-omit-frame-pointer
        INCLUDE : -I"..\src" -I".\mingw64\include"  -I"C:\msys64\usr\usr\include" -I"C:\Program Files\MATLAB\R2018a/extern/include" -I"C:\Program Files\MATLAB\R2018a/simulink/include"
        CXXOPTIMFLAGS : -O -DNDEBUG
        CXXDEBUGFLAGS : -g
        LDXX : C:\msys64\usr\bin\g++
        LINKER : C:\msys64\usr\bin\g++
        LDFLAGS : -m64 -Wl,--no-undefined -static -fopenmp "c:\Windows\System32\OpenCL.dll" -fopenmp
        LDTYPE : -shared -static
        LINKEXPORT : -Wl,"C:\Program Files\MATLAB\R2018a/extern/lib/win64/mingw64/mexFunction.def"
        LINKEXPORTVER : -Wl,"C:\Program Files\MATLAB\R2018a/extern/lib/win64/mingw64/exportsmexfileversion.def"
        LIBLOC : C:\Program Files\MATLAB\R2018a\extern\lib\win64\mingw64
        LINKLIBS : -L"C:\Program Files\MATLAB\R2018a\extern\lib\win64\mingw64" -llibmx -llibmex -llibmat
        LDOPTIMFLAGS : -s
        LDDEBUGFLAGS : -g
        OBJEXT : .obj
        LDEXT : .mexw64
        SETENV : set COMPILER=C:\msys64\usr\bin\gcc
                set CXXCOMPILER=C:\msys64\usr\bin\g++
                set COMPFLAGS=-c  -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp   -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -fexceptions -fno-omit-frame-pointer -DMATLAB_DEFAULT_RELEASE=R2017b  -DUSE_MEX_CMD   -m64 -DMATLAB_MEX_FILE  -DMATLAB_MEX_FILE
                set CXXCOMPFLAGS=-c  -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp   -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -DMATLAB_DEFAULT_RELEASE=R2017b  -DUSE_MEX_CMD   -m64 -DMATLAB_MEX_FILE  -DMATLAB_MEX_FILE
                set OPTIMFLAGS=-O -DNDEBUG
                set DEBUGFLAGS=-g
                set LINKER=C:\msys64\usr\bin\gcc
                set CXXLINKER=C:\msys64\usr\bin\g++
                set LINKFLAGS=-m64 -Wl,--no-undefined -static -fopenmp "c:\Windows\System32\OpenCL.dll" -fopenmp -shared -static -L"C:\Program Files\MATLAB\R2018a\extern\lib\win64\mingw64" -llibmx -llibmex -llibmat -Wl,"C:\Program Files\MATLAB\R2018a/extern/lib/win64/mingw64/mexFunction.def"
                set LINKDEBUGFLAGS=-g
                set NAME_OUTPUT= -o "%OUTDIR%%MEX_NAME%%MEX_EXT%"
        MINGWROOT : C:\msys64\usr
        MINGWTARGET : x86_64-pc-msys
        MATLABROOT : C:\Program Files\MATLAB\R2018a
        ARCH : win64
        SRC : "C:\msys64\home\fangq\space\git\Project\mmc\src\mmclab.cpp";"C:\Program Files\MATLAB\R2018a\extern\version\cpp_mexapi_version.cpp"
        OBJ : C:\msys64\tmp\mex_1481040925092289_7396\mmclab.obj;C:\msys64\tmp\mex_1481040925092289_7396\cpp_mexapi_version.obj
        OBJS : C:\msys64\tmp\mex_1481040925092289_7396\mmclab.obj C:\msys64\tmp\mex_1481040925092289_7396\cpp_mexapi_version.obj "built/xorshift128p_rand.o" "built/simpmesh.o" "built/tettracing.o" "built/mcx_utils.o" "built/tictoc.o" "built/mmc.o" "built/cjson/cJSON.o" "built/mmc_host.o" "built/highordermesh.o" "built/mmc_cl_utils.o" "built/mmc_cl_host.o"
        SRCROOT : C:\msys64\home\fangq\space\git\Project\mmc\src\mmclab
        DEF : C:\msys64\tmp\mex_1481040925092289_7396\mmc.def
        EXP : "C:\msys64\home\fangq\space\git\Project\mmc\mmclab\mmc.exp"
        LIB : "C:\msys64\home\fangq\space\git\Project\mmc\mmclab\mmc.lib"
        EXE : C:\msys64\home\fangq\space\git\Project\mmc\mmclab\mmc.mexw64
        ILK : "C:\msys64\home\fangq\space\git\Project\mmc\mmclab\mmc.ilk"
        MANIFEST : "C:\msys64\home\fangq\space\git\Project\mmc\mmclab\mmc.mexw64.manifest"
        TEMPNAME : C:\msys64\home\fangq\space\git\Project\mmc\mmclab\mmc
        EXEDIR : C:\msys64\home\fangq\space\git\Project\mmc\mmclab\
        EXENAME : mmc
        COMPFLAGS :  -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp   -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT
        OPTIM : -O -DNDEBUG
        LINKOPTIM : -s
        CMDLINE1_0 : C:\msys64\usr\bin\g++ -c -DMATLAB_DEFAULT_RELEASE=R2017b  -DUSE_MEX_CMD   -m64 -DMATLAB_MEX_FILE  -I"..\src" -I".\mingw64\include"  -I"C:\msys64\usr\usr\include" -I"C:\Program Files\MATLAB\R2018a/extern/include" -I"C:\Program Files\MATLAB\R2018a/simulink/include"  -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp   -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -fexceptions -fno-omit-frame-pointer -O -DNDEBUG "C:\msys64\home\fangq\space\git\Project\mmc\src\mmclab.cpp" -o C:\msys64\tmp\mex_1481040925092289_7396\mmclab.obj
        CMDLINE1_1 : C:\msys64\usr\bin\g++ -c -DMATLAB_DEFAULT_RELEASE=R2017b  -DUSE_MEX_CMD   -m64 -DMATLAB_MEX_FILE  -I"..\src" -I".\mingw64\include"  -I"C:\msys64\usr\usr\include" -I"C:\Program Files\MATLAB\R2018a/extern/include" -I"C:\Program Files\MATLAB\R2018a/simulink/include"  -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp   -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -fexceptions -fno-omit-frame-pointer -O -DNDEBUG "C:\Program Files\MATLAB\R2018a\extern\version\cpp_mexapi_version.cpp" -o C:\msys64\tmp\mex_1481040925092289_7396\cpp_mexapi_version.obj
-------------------------------------------------------------------
Building with 'MinGW64 Compiler (C++)'.
Warning: You are using an unsupported version of MinGW Compiler. To install the supported version of MinGW compiler, visit https://www.mathworks.com/help/matlab/matlab_external/install-mingw-support-package.html.
 For a list of currently supported compilers see: https://www.mathworks.com/support/compilers.
C:\msys64\usr\bin\g++ -c -DMATLAB_DEFAULT_RELEASE=R2017b  -DUSE_MEX_CMD   -m64 -DMATLAB_MEX_FILE  -I"..\src" -I".\mingw64\include"  -I"C:\msys64\usr\usr\include" -I"C:\Program Files\MATLAB\R2018a/extern/include" -I"C:\Program Files\MATLAB\R2018a/simulink/include"  -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp   -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -fexceptions -fno-omit-frame-pointer -O -DNDEBUG "C:\msys64\home\fangq\space\git\Project\mmc\src\mmclab.cpp" -o C:\msys64\tmp\mex_1481040925092289_7396\mmclab.obj
C:\msys64\usr\bin\g++ -c -DMATLAB_DEFAULT_RELEASE=R2017b  -DUSE_MEX_CMD   -m64 -DMATLAB_MEX_FILE  -I"..\src" -I".\mingw64\include"  -I"C:\msys64\usr\usr\include" -I"C:\Program Files\MATLAB\R2018a/extern/include" -I"C:\Program Files\MATLAB\R2018a/simulink/include"  -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp   -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -fexceptions -fno-omit-frame-pointer -O -DNDEBUG "C:\Program Files\MATLAB\R2018a\extern\version\cpp_mexapi_version.cpp" -o C:\msys64\tmp\mex_1481040925092289_7396\cpp_mexapi_version.obj
C:\msys64\usr\bin\g++ -m64 -Wl,--no-undefined -static -fopenmp "c:\Windows\System32\OpenCL.dll" -fopenmp -shared -static -s -Wl,"C:\Program Files\MATLAB\R2018a/extern/lib/win64/mingw64/exportsmexfileversion.def" C:\msys64\tmp\mex_1481040925092289_7396\mmclab.obj C:\msys64\tmp\mex_1481040925092289_7396\cpp_mexapi_version.obj "built/xorshift128p_rand.o" "built/simpmesh.o" "built/tettracing.o" "built/mcx_utils.o" "built/tictoc.o" "built/mmc.o" "built/cjson/cJSON.o" "built/mmc_host.o" "built/highordermesh.o" "built/mmc_cl_utils.o" "built/mmc_cl_host.o"  -L"C:\Program Files\MATLAB\R2018a\extern\lib\win64\mingw64" -llibmx -llibmex -llibmat -o C:\msys64\home\fangq\space\git\Project\mmc\mmclab\mmc.mexw64
Recompile embedded version with '-DMATLAB_MEXCMD_RELEASE=R2017b'
C:\msys64\usr\bin\g++ -c -DMATLAB_DEFAULT_RELEASE=R2017b  -DUSE_MEX_CMD   -m64 -DMATLAB_MEX_FILE  -I"..\src" -I".\mingw64\include"  -I"C:\msys64\usr\usr\include" -I"C:\Program Files\MATLAB\R2018a/extern/include" -I"C:\Program Files\MATLAB\R2018a/simulink/include"  -c -Wall -g -DMCX_EMBED_CL -fno-strict-aliasing -m64 -DMMC_USE_SSE -DHAVE_SSE2 -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -fopenmp   -DMCX_CONTAINER -DUSE_OS_TIMER -DUSE_OPENCL -DMMC_XORSHIFT -fexceptions -fno-omit-frame-pointer -O -DNDEBUG "C:\Program Files\MATLAB\R2018a\extern\version\cpp_mexapi_version.cpp" -o C:\msys64\tmp\mex_1481040925092289_7396\cpp_mexapi_version.obj -DMATLAB_MEXCMD_RELEASE=R2017b
C:\msys64\usr\bin\g++ -m64 -Wl,--no-undefined -static -fopenmp "c:\Windows\System32\OpenCL.dll" -fopenmp -shared -static -s -Wl,"C:\Program Files\MATLAB\R2018a/extern/lib/win64/mingw64/exportsmexfileversion.def" C:\msys64\tmp\mex_1481040925092289_7396\mmclab.obj C:\msys64\tmp\mex_1481040925092289_7396\cpp_mexapi_version.obj "built/xorshift128p_rand.o" "built/simpmesh.o" "built/tettracing.o" "built/mcx_utils.o" "built/tictoc.o" "built/mmc.o" "built/cjson/cJSON.o" "built/mmc_host.o" "built/highordermesh.o" "built/mmc_cl_utils.o" "built/mmc_cl_host.o"  -L"C:\Program Files\MATLAB\R2018a\extern\lib\win64\mingw64" -llibmx -llibmex -llibmat -o C:\msys64\home\fangq\space\git\Project\mmc\mmclab\mmc.mexw64
MEX completed successfully.
fangq@zen:~/space/git/Project/mmc/src$ which gcc
/usr/bin/gcc
fangq@zen:~/space/git/Project/mmc/src$ which g++
/usr/bin/g++
fangq@zen:~/space/git/Project/mmc/src$ which cc
/usr/bin/cc
fangq@zen:~/space/git/Project/mmc/src$ gcc --version
gcc (GCC) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...