List Info

Thread: make can not find .cpp file, any general comments or suggestions to debug?




make can not find .cpp file, any general comments or suggestions to debug?
user name
2006-05-04 07:01:30
Thanks Dave,


I agree with all your points, besides,

> CPPCLAGS is used by th preprocessor, the C compiler,
> and the C++
> compiler (and other things that use the preprocessor

In my previous mind, CPPFLAGS is only used for
preprocessor, you mean it is also used for C and C++
compiler?

(I think maybe you mean C and C++ compiler invokes C
preprocessor?)


regards,
George

--- Dave Hylands <dhylandsgmail.com> wrote:

> Hi Lin,
> 
> > 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.co
m/
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection
around 
http://mail.yahoo.com 


_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make
make can not find .cpp file, any general comments or suggestions to debug?
user name
2006-05-04 07:15:42
Hi George,

> I agree with all your points, besides,
>
> > CPPCLAGS is used by th preprocessor, the C
compiler,
> > and the C++
> > compiler (and other things that use the
preprocessor
>
> In my previous mind, CPPFLAGS is only used for
> preprocessor, you mean it is also used for C and C++
> compiler?
>
> (I think maybe you mean C and C++ compiler invokes C
> preprocessor?)

Yeah - Anything that uses the preprocessor uses CPPFLAGS.
The C and
C++ compilers always use the pre-processor, so they always
use
CPPFLAGS.

Assembler files that end in .s don't use the preprocessor
so they
don't use CPPFLAGS, but assembler files which end in .S use
the
preprocessor, so they do use CPPFLAGS.

CPPFLAGS should only contain preprocessor options.

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


_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make
make can not find .cpp file, any general comments or suggestions to debug?
user name
2006-05-07 07:47:01
Thanks Dave!


> Assembler files that end in .s don't use the
> preprocessor so they

Do you mean assembly language source codes files by
"Assembler files"?


regards,
George

--- Dave Hylands <dhylandsgmail.com> wrote:

> Hi George,
> 
> > I agree with all your points, besides,
> >
> > > CPPCLAGS is used by th preprocessor, the C
> compiler,
> > > and the C++
> > > compiler (and other things that use the
> preprocessor
> >
> > In my previous mind, CPPFLAGS is only used for
> > preprocessor, you mean it is also used for C and
> C++
> > compiler?
> >
> > (I think maybe you mean C and C++ compiler invokes
> C
> > preprocessor?)
> 
> Yeah - Anything that uses the preprocessor uses
> CPPFLAGS. The C and
> C++ compilers always use the pre-processor, so they
> always use
> CPPFLAGS.
> 
> Assembler files that end in .s don't use the
> preprocessor so they
> don't use CPPFLAGS, but assembler files which end in
> .S use the
> preprocessor, so they do use CPPFLAGS.
> 
> CPPFLAGS should only contain preprocessor options.
> 
> --
> Dave Hylands
> Vancouver, BC, Canada
> http://www.DaveHylands.co
m/
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection
around 
http://mail.yahoo.com 


_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )