Thread: compiler error help?

  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    2

    compiler error help?

    i used the command:
    make driver1

    and got this error:
    cc -o driver1 driver1.c
    "driver1.c", line 1: warning: invalid white space character in directive
    "driver1.c", line 2: warning: invalid white space character in directive
    Undefined first referenced
    symbol in file
    leap driver1.o
    ld: fatal: Symbol referencing errors. No output written to driver1
    *** Error code 1

    driver1.c uses leap.h

    could anyone tell me what I need to fix?

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    The errors are related to the contents in the files. I do suggest you post them. At least the lines it complains about.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Registered User
    Join Date
    Sep 2009
    Posts
    2
    driver1.c :
    Code:
    #include<stdio.h>
    #include "leap.h"
    main() {
    }
    *** I didn't include the contents in main() because I don't know how my professor would feel about me sharing my homework online! (same with leap.c)

    leap.c:
    Code:
    #include "leap.h"
    #define FALSE 0
    #define TRUE 1
    int leap(int year) {
    }
    leap.h:
    Code:
    int leap(int year);

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  2. Compiler Paths...
    By Cobra in forum C++ Programming
    Replies: 5
    Last Post: 09-26-2006, 04:04 AM
  3. C Compiler and stuff
    By pal1ndr0me in forum C Programming
    Replies: 10
    Last Post: 07-21-2006, 11:07 AM
  4. I can't get this new compiler to work.
    By Loduwijk in forum C++ Programming
    Replies: 7
    Last Post: 03-29-2006, 06:42 AM
  5. how to call a compiler?
    By castlelight in forum C Programming
    Replies: 3
    Last Post: 11-22-2005, 11:28 AM