Compilation Error

This is a discussion on Compilation Error within the C Programming forums, part of the General Programming Boards category; Hi, I'm new to c programming language. I trying to compile a project. but I get a compilation error. ||=== ...

  1. #1
    Registered User
    Join Date
    May 2011
    Posts
    7

    Compilation Error

    Hi,

    I'm new to c programming language.
    I trying to compile a project. but I get a compilation error.

    ||=== , Debug ===|
    C:\Users\Windows\..\common\..\Windows\ostypes.h|57 |error: expected '=', ',', ';', 'asm' or '__attribute__' before 'bit64'|

    If this is a not a valid question or If I did not provide the right information please excuse me.

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    It would help if we could see a bit of the code you are referencing there.


    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    May 2011
    Posts
    7
    typedef _int64 bit64;
    [/B]typedef unsigned int bit32;
    typedef unsigned short bit16;
    typedef unsigned char bit8;

    typedef bit32 HBA_HANDLE;
    typedef bit32 agStatus_t;
    typedef bit32 agBoolean;

    the compiler points to the first line as error. I'm using code blocks to compile it. should I use any header file to get through this error?

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    _int64 is not a standard type. I think windows.h defines it, so perhaps you were expected to have that header file first (just based on your path anyway, that seems reasonable).

  5. #5
    Registered User
    Join Date
    May 2011
    Posts
    7
    I have it included

  6. #6
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    22,306
    Try __int64 instead, or use long long if you can compile with respect to C99.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  7. #7
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Do you have it included before this header?

    Actually, upon review of the documentation, it appears that Microsoft's version is __int64, with two underscores.

    You should be able to replace _int64 with "long long".

  8. #8
    Registered User
    Join Date
    May 2011
    Posts
    7
    Great. It did work.

    The _ _int64 keyword declares a new type, a 64-bit (8-byte) integer.

    So this specific to only windows right?

  9. #9
    Registered User
    Join Date
    May 2011
    Posts
    7
    Thank you.

  10. #10
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    That is definitely windows-only.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. error: was not declared in this scope compilation error
    By i_r_tomash in forum C Programming
    Replies: 2
    Last Post: 05-27-2010, 08:44 AM
  2. compilation error using std::map
    By dbeyer in forum C++ Programming
    Replies: 8
    Last Post: 03-02-2006, 04:10 PM
  3. compilation error
    By blue_gene in forum C++ Programming
    Replies: 2
    Last Post: 04-13-2004, 08:26 AM
  4. compilation error
    By blue_gene in forum C++ Programming
    Replies: 1
    Last Post: 12-28-2003, 12:49 AM
  5. Error with compilation
    By mattbrrtt in forum C Programming
    Replies: 0
    Last Post: 01-08-2002, 04:44 AM

Tags for this Thread


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