I am starting to learn about makefiles. Looking at the output I see a lot of occurrences of:
g++ -DHAVE_CONFIG_H -I ...
what is -DHAVE_CONFIG_H exactly? What is the function of this compilation option?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
All that
-DHAVE_CONFIG_Hdoes is to define the pre-processor tokenHAVE_CONFIG_Hexactly as if you had#define HAVE_CONFIG_Hright at the start of each of your source files.As to what it’s used for, that depends entirely upon the rest of your source file (and everything that it includes as well). That’s where you should be looking for to work out its effect.
It looks like it may mean that a header file
config.his available and should be included, in which case you’ll probably find the following sequence somewhere in you source files:which will include the header file when you say it’s available. However that’s supposition on my part and by no means the exact effect, just what I would use such a preprocessor symbol for.