我在我的 Mac 上“brew install xmake”,并且有一个 .cpp 文件,我运行 xmake 并在目录中生成一个 xmake.lua。然后它报告:
error: cannot get program for cxx
我已经安装了 clang(别名为 g++)。它工作正常。我然后:
$sudo ln -s /usr/bin/g++ /usr/local/bin/cxx
嗯,再次运行xmake,还是报同样的错误:
error: cannot get program for cxx
如何处理?谢谢
----------------------我试过这些,不工作:
$xmake f -p cross
$xmake
error: cannot get program for cxx
$export CC=clang LD=clang++ xmake
$xmake
error: cannot get program for cxx
----------------------看我的诊断:
$xmake f -p cross -c
(In fact no output)
$xmake -r -v
configure
{
plat = cross
, arch = none
, ccache = true
, kind = static
, buildir = build
, host = macosx
, mode = release
, clean = true
}
checking for the g++ ... no
checking for the linker (ld: g++) ... no
checking for the gcc ... no
checking for the linker (ld: gcc) ... no
checking for the clang++ ... no
checking for the linker (ld: clang++) ... no
checking for the clang ... no
checking for the linker (ld: clang) ... no
error: cannot get program for ld
$which g++
/usr/bin/g++
$which clang
/usr/bin/clang