Thread: 'functions' in make?

  1. #1
    Registered User
    Join Date
    Jul 2002
    Posts
    913

    'functions' in make?

    heres my newest make file problem. maybe this will make sense soon.

    heres my make file:
    Code:
    str_remove.o : str_remove.c
    	gcc -c str_remove.c
    	ar -cr str_remove.a
    	ranlib str_remove.a
    str_replace.o : str_replace.c
    	gcc -c str_replace.c
    	ar -cr str_replace.a 
    	ranlib str_replace.a
    str_copy.o : str_copy.c
    	gcc -c str_copy.c
    	ar -cr str_copy.a 
    	ranlib str_copy.a
    str_count.o : str_count.c
    	gcc -c str_count.c
    	ar -cr str_count.a 
    	ranlib str_count.a
    str_insert.o : str_insert.c
    	gcc -c str_insert.c
    	ar -cr str_insert.a 
    	ranlib str_insert.a
    str_move.o : str_move.c str_remove.c str_insert.c
    	gcc -c str_move.c str_remove.c str_insert.c
    	ar -cr str_move.a 
    	ranlib str_move.a
    .PHONY: all clean
    all:
    	str_remove.o
    	str_replace.o
    	str_copy.o
    	str_count.o
    	str_insert.o
    	str_move.o
    clean:
    	rm *.o
    	rm *.a
    when i run make all i get
    Code:
    str_remove.o
    process_begin: CreateProcess(I:\libraries\strings\str_remove.o, str_remove.o, ..
    .) failed.
    make (e=193): Error 193make: *** [all] Error 193
    so can you use rules as functions? whats wrong?

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    No need for a new thread, we're still going with the old one
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Makefile Problem: None rule to make target
    By chris24300 in forum Linux Programming
    Replies: 25
    Last Post: 06-17-2009, 09:45 AM
  2. Splitting source into multiple files(Linux & make)
    By IceDane in forum C Programming
    Replies: 6
    Last Post: 05-18-2009, 07:31 AM
  3. Replies: 5
    Last Post: 01-13-2006, 12:00 AM
  4. Win32 Common Controls in C++, how do i make and use them?
    By C+noob in forum Windows Programming
    Replies: 6
    Last Post: 01-09-2006, 11:53 AM
  5. structure vs class
    By sana in forum C++ Programming
    Replies: 13
    Last Post: 12-02-2002, 07:18 AM