Writing a Makefile
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Debian support > Linux Debian support > Writing a Makefile




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Writing a Makefile  
jamiil


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-17-07 06:14 PM

Where does the $(LIB) should be plugged in in the Makefile below. I am
getting an error that reads:
------------------
exception.hpp linker input file unused because linking not done
------------------
Thanks in advance folks.

# My Makefile



# Compiler name

CPP=g++

# Flagas

CFLAGS = -Wall -g -ansi `gtk-config --cflags`
LIBS = `gtk-config --libs`#-- What do I do with this var? -#



# Files to be included
EXCEPTION_HPP=./exception/exception.hpp
EXCEPTION_CPP=./exception/exception.cpp

# Variables

OBJS = main.o exception.o

EXEC = MyApp



#Application name

my_app: $(OBJS)

$(CPP) $(LDLIBS) $(OBJS) -o $(EXEC)

main.o: main.cpp

$(CPP) $(CFLAGS) -c main.cpp

exception.o: $(EXCEPTION_HPP)

$(CPP) $(CFLAGS) -c $(EXCEPTION_CPP)




clean:

rm -f exception.o

rm -f $(EXEC)



PHONY: clean






[ Post a follow-up to this message ]



    Re: Writing a Makefile  
Don Piven


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-20-07 12:14 PM

Sez jamiil:
> Where does the $(LIB) should be plugged in in the Makefile below. I am
> getting an error that reads:
> ------------------
> exception.hpp linker input file unused because linking not done
> ------------------
> Thanks in advance folks.
>
> # My Makefile
>
> [much snippage]
>
> CFLAGS = -Wall -g -ansi `gtk-config --cflags`
> LIBS = `gtk-config --libs`#-- What do I do with this var? -#
> OBJS = main.o exception.o
>
> my_app: $(OBJS)
>
> 	$(CPP) $(LDLIBS) $(OBJS) -o $(EXEC)

You might want to choose between LIBS and LDLIBS :-)





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 10:32 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register