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: Dave Hylands
Subject: Re: make can not find .cpp file, any general comments or suggestions to debug?
Date: Wed, 3 May 2006 23:27:07 -0700

Hi George,

Sending to the list....

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

Generally speaking, -D and -I options should be assigned to CPPFLAGS.

CPPCLAGS is used by th preprocessor, the C compiler, and the C++
compiler (and other things that use the preprocessor like asm files
with the .S extension).
CFLAGS is used by the C compiler
CXXFLAGS is used by the C++ compiler

-L tells the linker where to find libraries, so it should be added to LDFLAGS.
-l adds a library to the list of linker libraries and should be added to LDLIBS

Options like -Wall are compiler options and so should be added to
CFLAGS or CXXFLAGS

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/




reply via email to

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