Re: Required help on gnomeui



On Thu, May 24, 2001 at 04:16:01PM +0530, Darshan wakchaure Vashimail ltitl com wrote:
CAn anybody help me to write the make file for the same...

What i had written is:
=====================
darshan$ cat makefile
out : main.o
        g++ -o Result  main.o `gnome-config --cflags --libs gnomeui`

No, you want to have a rule to build Result. You now have a rule to
build out, which is never build at all, so each time you run make it
will relink Result although it might not be necessary. There is also no
need for the cflags in the link phase, so make it:

Result: main.o
        g++ -o Result main.o `gnome-config --libs gnomeui`


main.o : main.cpp
        g++  -c main.cpp  `gnome-config --cflags --libs gnomeui`

Same over here: no need for the link flags in the compile phase:

        g++  -c main.cpp  `gnome-config --cflags gnomeui`


clean :
        rm main.o Result

Make that:

        rm -f main.o Result

Or otherwise you'll get an error when the files don't exist.

 How do i use -I and -L options ???

By just adding them to the compiler line.


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email: J A K Mouw its tudelft nl
WWW: http://www-ict.its.tudelft.nl/~erik/




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