是否可以将Cilk Plus与MinGW-w64一起使用 (x86_64-4.9.2-posix-sjlj-rt_v3-rev0) 一起使用?
当我不使用-fcilkplus
选项时,编译器会给我一个错误"-fcilkplus must be enabled to use '_Cilk_spawn'"
- 很明显它可以识别扩展关键字。另一方面,在编译器安装文件夹中没有任何痕迹,'cilk.h'
也没有任何其他文件包含"cilk"
在它的名称中。
如果使用 options 编译-fcilkplus -lcilkrts
,我会得到一个错误:
"libcilkrts.spec: No such file or directory"
.
编译自Code::Blocks,错误日志:
undefined reference to `__cilkrts_enter_frame_1'|
undefined reference to `__cilkrts_save_fp_ctrl_state'|
undefined reference to `__cilkrts_save_fp_ctrl_state'|
undefined reference to `__cilkrts_sync'|
undefined reference to `__cilkrts_rethrow'|
undefined reference to `__cilkrts_save_fp_ctrl_state'|
undefined reference to `__cilkrts_sync'|
undefined reference to `__cilkrts_rethrow'|
undefined reference to `__cilkrts_leave_frame'|
undefined reference to `__cilkrts_save_fp_ctrl_state'|
undefined reference to `__cilkrts_sync'|
undefined reference to `__cilkrts_rethrow'|
undefined reference to `__cilkrts_leave_frame'|
undefined reference to `__cilkrts_enter_frame_fast_1'|
undefined reference to `__cilkrts_leave_frame'|
||=== Build failed: 15 error(s), 2 warning(s) (0 minute(s), 1 second(s)) ===|
MinGW 和 TDM-MinGW 都使用较旧的 gcc 版本(4.8 系列),因此它们无法识别cilk
关键字。