我在用clion写C程序的时候想用到Julia,就参照着documentation在CMakeLists.txt里加了两行,然后再在程序里include。但是build的时候弹出了错误信息,不知道要怎么弄,求大神指教,谢谢。
用的编译器是MinGW w64 6.0
Julia版本是1.0
CMakeLists里添加的代码是:
set(INC_DIR C:/Julia/lang/Julia-1.0.0/include/julia)
include_directories(${INC_DIR})
报错提示如下:
Scanning dependencies of target ClionProjects
[ 11%] Building C object CMakeFiles/ClionProjects.dir/greenhand/draft.obj
In file included from C:/Julia/lang/Julia-1.0.0/include/julia/julia.h:67,
from D:\Onedrive\Study\Code\C\ClionProjects\greenhand\draft.c:2:
C:/Julia/lang/Julia-1.0.0/include/julia/atomics.h:9:4: error: #error Julia can only be built for architectures above Pentium 4. Pass -march=pentium4, or set MARCH=pentium4 and ensure that -march is not passed separately with an older architecture.
error Julia can only be built for architectures above Pentium 4. Pass -march=pentium4, or set MARCH=pentium4 and ensure that -march is not passed separately with an older architecture.
^~~~~
mingw32-make.exe[3]: *** [CMakeFiles\ClionProjects.dir\build.make:161: CMakeFiles/ClionProjects.dir/greenhand/draft.obj] Error 1
mingw32-make.exe[2]: *** [CMakeFiles\Makefile2:72: CMakeFiles/ClionProjects.dir/all] Error 2
mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:84: CMakeFiles/ClionProjects.dir/rule] Error 2
mingw32-make.exe: *** [Makefile:117: ClionProjects] Error 2