Thread: makefile

  1. #1
    Registered User
    Join Date
    Feb 2006


    I have written a big program.. In it i have this line of code

    line 569 :
    if(!isascii((int)(currentChar->data))) {
    I tired compiling my program in unix using a make file.

    my makefile is

    all: main.o FileADT.o
    	gcc -o run main.o FileADT.o
    FileADT.o: FileADT.c FileADT.h
    	gcc -Wall -ansi -pedantic -c FileADT.c
    main.o: main.c FileADT.h
    	gcc -Wall -ansi -pedantic -c main.c
    	 rm FileADT.o main.o
    where fileADT.c is the codes for the program. main.c is like a driver program. and the run is the command /object file that runs the program.

    The FileADT.h,header file had the following
    #include <stdlib.h> #include <string.h> #include <stdio.h> 
    #include <ctype.h>
    when i compile in unix using make, i get this error:
    line 569: warning: implicit declaration of 'isascii'

    i suspect i have missed out something in the header file or in the make file. Would be great if someone can help.

    Wanting to just get rid of that warning and wonder if some1 can spot the BUG.

    The whole file is here
    it can run in unix enviorment.type make to compile
    and type 'run input output' to execute the program.

  2. #2
    Registered User
    Join Date
    Mar 2006
    implicit decaluration usualy means the function is not defined.

    make sure u have the the required libary for isascii, which is
    " #include <ctype.h> "

    Hope that helps

  3. #3
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    isascii is not as standard function, BTW, so it may or may not be in any particular header. Perhaps investigate the original implemention's platform to see which compiler it was supposed to be compiled with, or possibly write your own version.
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

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. Building a project using a Makefile
    By starcatcher in forum Windows Programming
    Replies: 2
    Last Post: 11-23-2008, 11:50 PM
  3. unix makefile won't work but works in Dev C++
    By jk1998 in forum C++ Programming
    Replies: 1
    Last Post: 06-09-2007, 03:54 PM
  4. makefile blues....
    By WaterNut in forum C Programming
    Replies: 6
    Last Post: 05-30-2005, 08:22 PM
  5. Need help with Makefile
    By xshapirox in forum C++ Programming
    Replies: 14
    Last Post: 09-28-2004, 03:32 PM