Thread: free Windows 64-bit compiler?

  1. #1
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229

    free Windows 64-bit compiler?

    Hi,
    I cannot seem to find any free Windows C++ compiler that can generate 64-bit code to be run on Windows XP Professional 64-bit Edition. Seems to me like both mingw and cygwin does not generate 64-bit code. I am aware that visual studio and intel compiler both have 64-bit support. But they are not free, and I have been a Linux programmer for quite a while, and would prefer gcc based solutions (icc is okay too, but Intel only offers the free version on Linux, because, presumably, only Linux programmers can be non-commercial...).

    Thank you

  2. #2
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    Looks like someone didn't read their documentation, and cygwin isn't a compiler. --arch may help you.

  3. #3
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    --arch doesn't exist; GCC doesn't have double-dash options. The option is -march=..., and it is just an optimization hint. The key to generating 64-bit code is the -m64 option.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  4. #4
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    *didn't read the documentation either* I knew it was something that, haven't needed to generate x64 code before but I remembered the arch stuff from when I was messing with Linux, figured it was in there.

  5. #5
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    Thank you for your replies.
    I tried gcc under cygwin and got the error:
    Code:
    $ gcc -m64 test.c
    test.c:1: sorry, unimplemented: 64-bit mode not compiled in
    the same thing happens with mingw

    Has anyone successfully compiled 64-bit code with cygwin's gcc?

    Thanks

  6. #6
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Yeah, googling suggests that only the current CVS head is able to do that. See for example this thread from August:
    http://www.nabble.com/Binutils-versi...-t4349028.html
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  7. #7
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    ah, i see. Guess I will just work on Linux for the time being then.

    Thank you

  8. #8
    Thang Le thavali's Avatar
    Join Date
    Jan 2011
    Location
    Earth
    Posts
    20
    Quote Originally Posted by cyberfish View Post
    Thank you for your replies.
    I tried gcc under cygwin and got the error:
    Code:
    $ gcc -m64 test.c
    test.c:1: sorry, unimplemented: 64-bit mode not compiled in
    the same thing happens with mingw

    Has anyone successfully compiled 64-bit code with cygwin's gcc?

    Thanks
    i met the same error too when build in Win7 64bit, MinGW g++ version 4.5

    MinGW has not till supported Win 64 bit yet ?

  9. #9
    Registered User
    Join Date
    Jan 2009
    Location
    Sweden
    Posts
    8
    I think mingw-w64 is what you´re looking for. GCC for both x64 & x86 Windows! - MinGW-w64

    I may be wrong about this but isn´t it possible to get the visual studio x64 compiler with the Windows SDK for free?

  10. #10
    Registered User
    Join Date
    Jun 2011
    Posts
    30
    Try the free version of MS visual Studio.

  11. #11
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Stop bumping ancient threads

    CLOSED

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. free 64-bit C++ compiler on Windows
    By cyberfish in forum C++ Programming
    Replies: 20
    Last Post: 11-04-2008, 12:14 AM
  2. 64 bit testing
    By DrSnuggles in forum C++ Programming
    Replies: 7
    Last Post: 11-20-2007, 03:20 AM
  3. Menu Item Caption - /a for right aligned Accelerator?
    By JasonD in forum Windows Programming
    Replies: 6
    Last Post: 06-25-2003, 11:14 AM
  4. Direct3d, Windows, and Free Software...
    By QuestionC in forum Game Programming
    Replies: 10
    Last Post: 01-20-2002, 12:02 AM
  5. How do I set up Borland's C++ Free compiler
    By Unregistered in forum C++ Programming
    Replies: 13
    Last Post: 11-03-2001, 11:18 PM