在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
。這是宣佈變量的正確方法嗎?