[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: make can not find .cpp file, any general comments or suggesti ons to
From: |
Leeuwesteijn,Joost |
Subject: |
RE: make can not find .cpp file, any general comments or suggesti ons to debug? |
Date: |
Wed, 3 May 2006 15:02:00 +0200 |
> but I can not find the relationship between CXXFLAGS and
> CPPFLAGS (for example, CXXFLAGS includes CPPFLAGS) --
> to my surprise, instead I found that CPPFLAGS is used
> for C (not C++)? Here is the original text from GNU
> make manual,
> --------------------
> CXXFLAGS Extra flags to give to the C++ compiler.
> CPPFLAGS Extra flags to give to the C preprocessor and
> programs that use it (the C and Fortran compilers).
> --------------------
Example of compile commands:
To compile C++:
$(CXX) $(CPPFLAGS) $(CXXFLAGS) etc.
To compile C:
$(CC) $(CPPFLAGS) $(CFLAGS) etc.
CPPFLAGS contains include directories (-I) and defines (-D), which can be
reused between C++ and C.
When you need to call the preprocessor (for example to generate dependencies
automagically), you only need to specify the $(CPPFLAGS) because you put
them in the separate $(CPPFLAGS) variable. Otherwise you would have to strip
them from the $(CFLAGS) because it also contains parameters that the
preprocessor can't handle.
Hope this helps.
--
Joost Leeuwesteijn
- RE: make can not find .cpp file, any general comments or suggesti ons to debug?,
Leeuwesteijn,Joost <=