Errors Concerning Include Files

This is a discussion on Errors Concerning Include Files within the Linux Programming forums, part of the Platform Specific Boards category; 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, ...

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,761
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,761
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

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, 09:04 PM
  2. Help me with function call
    By NeMewSys in forum C++ Programming
    Replies: 16
    Last Post: 05-22-2008, 02: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

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