编译cpp文件:
gcc -c a.c // 源文件 -> 汇编文件.o
gcc -o a a.o //汇编文件.o -> 可执行文件a
出现的错误: 对“std::out”未定义的引用
解决:gcc改成g++
出现的错误: ../lib/libgsl.so : 对cblas_ 未定义的引用
解决:对链接不到的库 显示链接:
g++ -o clusterMI clusterMI.o -lgsl -lm -lgslcblas
修改了$HOME/.bashrc之后 linux默认命令都不能用了
解决:原文:bashrc文件更改导致linux系统指令不能用的解决方案_7900X的博客-CSDN博客
export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
matlab程序linux下不启动图形界面直接执行命令:
matlab -nodesktop -nosplash -r matlabfile
参数含义:
-nodesktop - Do not start the MATLAB desktop. Use the current
terminal for commands. The Java virtual machine
will be started.
-nosplash - Do not display the splash screen during startup
[-r MATLAB_command]
只用文件名matlabfile,不能添加.m