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: Thu, 4 May 2006 08:20:24 -0400

%% Lin George <address@hidden> writes:

  lg> A great answer! I often use -I -D -l -L to
  lg> compile/build program/shared library. Do you have any
  lg> comments or suggestions about whether I should add -I
  lg> (-D, -l and -L) to CXXFLAGS or CPPFLAGS?

  lg> What about other options -Wall, -Wl, ... etc.

Look in the documentation for your C preprocessor.  Any flag that
appears in that documentation should go in CPPFLAGS.

Other flags belong somewhere else.

Typically, that means -I, -D, -U (not used much) would appear in
CPPFLAGS, and just about everything else would appear somewhere else.

-l, -L, and -Wl,... are _LINKER_ flags.  Obviously not appropriate for
the preprocessor.  In fact, you should put these into LDFLAGS or
similar.

-Wall is a compiler flag.  CFLAGS and/or CXXFLAGS.

Etc.

-- 
-------------------------------------------------------------------------------
 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]