LIBRARY_PATH和LD_LIBRARY_PATH

LIBRARY_PATH和LD_LIBRARY_PATH是Linux下的两个环境变量,二者的含义和作用分别如下: LIBRARY_PATH环境变量用于在程序编译期间查找动态链接库时指定查找共享库的路径,例如,指定gcc编译需要用到的动态链接库的目录。设置方法如下(其中,LIBDIR1和LIBDIR2为两个库目录): export LIBRARY_PATH=LIBDIR1:LIBDIR2:$LIBRARY_PATH LD_LIBRARY_PATH环境变量用于在程序加载运行期间查找动态链接库时指定除了系统默认路径之外的其他路径,注意,LD_LIBRARY_PATH中指定的路径会在系统默认路径之前进行查找。设置方法如下(其中,LIBDIR1和LIBDIR2为两个库目录): export LD_LIBRARY_PATH=LIBDIR1:LIBDIR2:$LD_LIBRARY_PATH 来自:LIBRARY_PATH和LD_LIBRARY_PATH环境变量的区别

go函数返回数组

Defining a function that returns a slice of variable size in golang First of all, slices are already of “variable size”: [100]int and […]int are array type definitions. []int is the correct syntax for a slice, and you could implement the function as: func BuildSlice(size int) []int { return make([]int, size) } The built-in function… Continue reading go函数返回数组

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!