CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2001
    Location
    Silicon Valley
    Posts
    113

    error compiling "typedef unsigned long long u64;"

    Long time ago a guy (who had since quit the company) wrote a code for some Atmel microprocessor running Linux, that had the following typedef:
    Code:
     typedef unsigned long long u64;
    It compiles just fine for the Atmel.
    I want to add some of that code (which, I think, doesn’t depend on hardware) to my Windows application that I’m developing in VC++ 6.0. Unfortunately, VC doesn’t want to compile it and gives me the following error:
    Code:
    c:\coreutils\receiver\inx\include\types.h(29) : error C2632: 'long' followed by 'long' is illegal
    I wonder if VC can digest this typedef at all?
    Last edited by kender_a; October 4th, 2006 at 05:49 PM. Reason: clarifications

  2. #2
    Join Date
    Apr 2005
    Posts
    221

    Re: error compiling "typedef unsigned long long u64;"

    Try ULONGLONG instead of "unsigned long long"

  3. #3
    Join Date
    Feb 2002
    Posts
    4,640

    Re: error compiling "typedef unsigned long long u64;"

    You can also try:
    Code:
    unsigned __int64
    Just be aware that whatever compiler/platform the original code was compiled on might not know about an "unsigned __int64". You might have to '#ifdef' the typedef:
    Code:
    #ifdef LINUX
    typedef unsigned long long u64;
    #else
    typedef unsigned __int64 u64;
    #endif
    Viggy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured