help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make can not find .cpp file, any general comments or suggestions to


From: Paul D. Smith
Subject: Re: make can not find .cpp file, any general comments or suggestions to debug?
Date: Fri, 28 Apr 2006 07:11:11 -0400

%% Lin George <address@hidden> writes:

  lg> I have solved this problem today. It is caused by
  lg> CFLAGS variable, which should be CXXFLAGS variable in
  lg> g++ -- I mis-defined the variable name CFLAGS in g++.

  lg> In my CFLAGS, I specified header file path (-I), so
  lg> related header files can not be found.

In general, you should add preprocessor flags (like -I and -D) to the
CPPFLAGS variable, not CFLAGS or CXXFLAGS.

CPPFLAGS is included in both CFLAGS and CXXFLAGS, plus separating out
these flags allows you to use them with other tools which might need
them to parse code, such as lint, makedepend, or whatever.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

[Prev in Thread] Current Thread [Next in Thread]