在g++
命令之前声明变量后,g++
命令不起作用。g ++:在Bash中声明变量后发现“命令未找到”
例如,下面的工作:
echo "Train LINE starts"
g++ -lm -pthread -Ofast -march=native -Wall -funroll-loops -ffast-math -Wno-unused-result line.cpp -o line -lgsl -lm -lgslcblas
但这不:
PATH="foo path"
echo "Train LINE starts"
g++ -lm -pthread -Ofast -march=native -Wall -funroll-loops -ffast-math -Wno-unused-result line.cpp -o line -lgsl -lm -lgslcblas
相反,我得到一个错误:g++: command not found
。这是宣布变量的正确方法吗?