Thread: Errors Concerning Include Files

  1. #1
    Registered User
    Join Date
    Jun 2006
    Posts
    6

    Errors Concerning Include Files

    I'm trying to compile this code and I keep getting these errors:

    Code:
    In file included from /usr/include/asm/elf.h:11,
    from /usr/include/linux/elf.h:6,
    from code.c:73:
    /usr/include/asm/system.h:302: error: expected declaration specifiers or ‘...’ before ‘u8’
    /usr/include/asm/system.h:302: error: expected declaration specifiers or ‘...’ before ‘u8’
    /usr/include/asm/system.h:303: error: expected declaration specifiers or ‘...’ before ‘u16’
    /usr/include/asm/system.h:303: error: expected declaration specifiers or ‘...’ before ‘u16’
    /usr/include/asm/system.h:304: error: expected declaration specifiers or ‘...’ before ‘u32’
    /usr/include/asm/system.h:304: error: expected declaration specifiers or ‘...’ before ‘u32’
    /usr/include/asm/system.h: In function ‘cmpxchg_386’:
    /usr/include/asm/system.h:311: error: too many arguments to function ‘cmpxchg_386_u8’
    /usr/include/asm/system.h:313: error: too many arguments to function ‘cmpxchg_386_u16’
    /usr/include/asm/system.h:315: error: too many arguments to function ‘cmpxchg_386_u32’
    Could anyone help me here? I'm new to linux and C.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Those seem to be unusual files to be including for someone new to C.
    What happened to just stdio.h and hello world?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Jun 2006
    Posts
    6
    This is coming from code not written by me. I'm just trying to compile it.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Yeah, this isn't really a board for
    "Hey, I just downloaded foo from the bar website, can you help me compile it on the baz compiler".

    We're here to help you learn C and C++ by you writing your own programs, and asking questions about it here.

    But you could try your luck by posting the URL of where you downloaded the program from, and perhaps we can suggest some approaches to try.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Unable to open include file SDL_audio.h
    By rraj.be in forum C Programming
    Replies: 2
    Last Post: 06-28-2008, 08:04 PM
  2. Help me with function call
    By NeMewSys in forum C++ Programming
    Replies: 16
    Last Post: 05-22-2008, 01:53 PM
  3. Why am I getting these errors??
    By maxthecat in forum Windows Programming
    Replies: 3
    Last Post: 02-03-2006, 01:00 PM
  4. errors using my parser- MSVC++ 6, bhtypes.h
    By AeroHammer in forum C++ Programming
    Replies: 6
    Last Post: 01-25-2005, 07:11 PM
  5. to #include or not to #include
    By krygen in forum C++ Programming
    Replies: 9
    Last Post: 12-25-2004, 12:06 AM