1.openssl命令和对称加密
openssl enc(对称加密) - 骏马金龙 - 博客园
2.gcc编译程序时,可能会用到“-I”(大写i),“-L”(大写l),“-l”(小写l)等参数
我们用gcc编译程序时,可能会用到“-I”(大写i),“-L”(大写l),“-l”(小写l)等参数,下面做个记录:
gcc -Wall -I /home/hello/include -L /home/hello/lib main.c -l world -Wl,-rpath,/you/dir/name -o prog
上面这句表示在编译hello.c时:
-I(大写i) /home/hello/include表示将/home/hello/include目录作为第一个寻找头文件的目录,寻找的顺序是:/home/hello/include-->/usr/include-->/usr/local/include
-L /home/hello/lib表示将/home/hello/lib目录作为第一个寻找库文件的目录,寻找的顺序是:/home/hello/lib-->/lib-->/usr/lib-->/usr/local/lib
-l(小写的L)world表示在上面的lib的路径中寻找libworld.so动态库文件(如果gcc编译选项中加入了“-static”表示寻找libworld.a静态库文件)
-rpath=dir
把目录添加到运行时类库搜索路径
-Wl,option
把选项传递给Linker.如果选项值包含逗号,就把他拆分成多个选项
-Wl,-rpath,/opt/lib
解决 error while loading shared libraries: ****.so: cannot open shared object file: No such file or directory
3.宏内核和微内核
.聊了聊宏内核和微内核,并吹了一波 Linux_慕课手记
4.libmodbus驱动库的使用