CFLAGS represents an option for the C compiler.
Cxxflags represents options for the C + + compiler.
These two variables actually cover the two steps of compiling and assembling.
Let's look at a few related environment variables: PATH, Ldflags, CFLAGS
PATH: Everyone should be familiar with it. After installing a package, it is possible to create a bin directory in the installation directory, in which there are executable programs, which we need to add to the PATH environment variable in order for the system to find these programs. Here's how to join.
Ldflags: Some of the optimization parameters used by the compiler, such as GCC, or the location of the library files can be specified. Usage: ldflags= "-l/usr/lib-l/path/to/your/lib". Each installation of a package will almost certainly create a Lib directory in the installation directory. If you install a package clearly, and install another package, it Leng said can not find, then the package of the Lib path to join the Ldfalgs to try it.
CFLAGS: Similar to Ldflags, but to Rigaru is the path to the header file (. h file), such as: cflags= "-i/usr/include-i/path/to/your/include". Similarly, when a package is installed, an include directory is created under the installation path, and when a problem occurs during the installation, try adding the Include directory of the previously installed package to the variable.
So how do you add these paths to those variables? Take the path variable as an example.
one way is to: Directly below the command line:
$ path= "$PATH:/path/to/your/bin:/another/path/to/bin"
$ Export PATH
The advantage of this method is convenient, immediate effect, the disadvantage is that the current session or shell closed after the failure, the next time you have to run again.
Another way is to: Add the following two lines of content to the ~/.BASHRC file, if you want it to affect the entire system and not just the current user, add the following to the/ETC/BASH.BASHRC (remember that the system is/ETC/BASHRC this file)
PATH="$PATH:/path/to/your/bin:/another/path/to/bin"
Export PATH
Then, restart the shell.
It is important to note that the delimiter of the PATH variable is: number, the other is a space,
So ldflags should be like this:
ldflags= "$LDFLAGS-l/path/to/lib-l/path/to/lib"
Cflags should be like this:
cflags= "$CFLAGS-i/path/to/iclude-i/path/to/include"
PATH Ldflags CFLAGS