gcc options

1.-Werror

视警告为错误;出现任何警告即放弃编译.

2.-Wl,-rpath

向ld传递-rpath参数,add a direcory to the runtime library search path. This is used when linking an ELF executable with shared objects. All -rpath arguments are concatenated and passed to the runtime linker, which uses them to locate shared objects at runtime.

3.环境变量

LD_LIBRARY_PATH=”/path/to/lib”, LDFLAGS=”-L/path/to/lib”, C_INCLUDE_PATH=”-I/path/to/include”, CFLAGS, CPPFLAGS

Leave a Reply

Your email address will not be published. Required fields are marked *