compiler error help?

This is a discussion on compiler error help? within the C Programming forums, part of the General Programming Boards category; i used the command: make driver1 and got this error: cc -o driver1 driver1.c "driver1.c", line 1: warning: invalid white ...

  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
    Posts
    23,033
    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, 02:30 PM
  2. Compiler Paths...
    By Cobra in forum C++ Programming
    Replies: 5
    Last Post: 09-26-2006, 05:04 AM
  3. C Compiler and stuff
    By pal1ndr0me in forum C Programming
    Replies: 10
    Last Post: 07-21-2006, 12:07 PM
  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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21