For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > March 2008 > Nasty includes









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Nasty includes
saneman

2008-03-30, 9:10 pm

I am trying to compile the files in this example:

http://www.gtkmm.org/docs/gtkmm-2.4...helloworld.html

With my own makefile that looks like:

INC=/usr/include/gtkmm-2.4/ -I/usr/include/glibmm-2.4/
-I/usr/lib/glibmm-2.4/include/ -I/usr/include/glib-2.0/
-I/usr/lib/glib/include/ -I/usr/include/sigc++-2.0/sigc++/
-I/usr/include/sigc++-2.0/
all: main

main: helloworld.h helloworld.cc main.cc
gcc main.cc -I$(INC) -o main

It seems that the more includes I add more are needed. How do I make
sure all includes are added without make a 4 pages makefile?
Ian Collins

2008-03-30, 9:11 pm

saneman wrote:
> I am trying to compile the files in this example:
>
> http://www.gtkmm.org/docs/gtkmm-2.4...helloworld.html
>
> With my own makefile that looks like:
>
> INC=/usr/include/gtkmm-2.4/ -I/usr/include/glibmm-2.4/
> -I/usr/lib/glibmm-2.4/include/ -I/usr/include/glib-2.0/
> -I/usr/lib/glib/include/ -I/usr/include/sigc++-2.0/sigc++/
> -I/usr/include/sigc++-2.0/
> all: main
>
> main: helloworld.h helloworld.cc main.cc
> gcc main.cc -I$(INC) -o main
>
> It seems that the more includes I add more are needed. How do I make
> sure all includes are added without make a 4 pages makefile?


What's the problem? You only type the makefile once.

--
Ian Collins.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com