Thread: Compile error.

  1. #1
    papudi
    Guest

    Compile error.

    hello all,

    I am trying to compile a simple C program on SunOS 5.5.1 and I get the following errors,

    /usr/include/stdio.h:107: Invald token in expression
    /usr/include/stdio.h:109: Invald token in expression
    /usr/include/ctype.h:81: Invald token in expression


    Any ideas as to what am I missing? I looked at the lines mentioned above, but could not figure out whats going wrong.

    Any help is appreciated!

    Thanks.

  2. #2
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    Could it be that in the header-files as mentioned by the compiler are some invalid characters? For example, if you have written code on a Windows machine and transport it to a Unix machine for compiling, then it will complain because of the DOS end of line characters, which are invalid characters for Unix compilers.

    I would suggest you use a text-editor on SunOS and take a look at the mentioned lines to see if there is an invalid character.

  3. #3
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >>>Any ideas as to what am I missing?
    Yes, you're missing the code. If you want help from us, it's probably best you actually post some.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  4. #4
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >Any ideas as to what am I missing?
    I could be mistaken, it's happened before, but you may have an invalid token in the expression.

    -Prelude
    My best code is written with the delete key.

  5. #5
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,212
    the command
    dos2unix <filename>
    fixes the above mentioned end of line character problem.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Beginner Needs help in Dev-C++
    By Korrupt Lawz in forum C++ Programming
    Replies: 20
    Last Post: 09-28-2010, 01:17 AM
  2. An error is driving me nuts!
    By ulillillia in forum C Programming
    Replies: 5
    Last Post: 04-04-2009, 09:15 PM
  3. DX - CreateDevice - D3DERR_INVALIDCALL
    By Tonto in forum Game Programming
    Replies: 3
    Last Post: 12-01-2006, 07:17 PM
  4. error: template with C linkage
    By michaels-r in forum C++ Programming
    Replies: 3
    Last Post: 05-17-2006, 08:11 AM
  5. Problem with Visual C++ Object-Oriented Programming Book.
    By GameGenie in forum C++ Programming
    Replies: 9
    Last Post: 08-29-2005, 11:21 PM