Thread: Is there any up to date C++ to C converter?

  1. #31
    Registered User
    Join Date
    Jul 2007
    Posts
    88
    Quote Originally Posted by robwhit View Post
    How did this work out for you?
    I am not amazed because the .bc file can be only created on *nix and not on NT based.

  2. #32
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by sept View Post
    I am not amazed because the .bc file can be only created on *nix and not on NT based.
    That's strange, since I understood that the LLVM project uses gcc as a base, and it uses the same source for both Linux and Windows. But perhaps one solution would be to build a Linux system, compile the C++ code to C code on that, then compile the resulting code on the Windows system. It's not the most practical of solutions, but with a few hundred dollars for a second machine, it should be doable to get it working in a day or two.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #33
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    You could also use a distribution of Linux that runs under Windows.

  4. #34
    Registered User
    Join Date
    Jul 2007
    Posts
    88
    Quote Originally Posted by matsp View Post
    That's strange, since I understood that the LLVM project uses gcc as a base, and it uses the same source for both Linux and Windows. But perhaps one solution would be to build a Linux system, compile the C++ code to C code on that, then compile the resulting code on the Windows system. It's not the most practical of solutions, but with a few hundred dollars for a second machine, it should be doable to get it working in a day or two.

    --
    Mats
    Strange but true. Source:
    http://llvm.org/docs/GettingStartedVS.html#tutorial

    Quote Originally Posted by robwhit View Post
    You could also use a distribution of Linux that runs under Windows.
    I am on it.

    Even if this is not the most practical solution.

    Really strange that this bc file can be exclusively created under nix.

  5. #35
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    And it also appears that it only works to build small/trivial programs from the .bc file without gcc, so I suspect this is not actually a generic solution that you can compile with any compiler.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  6. #36
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    I also wonder how it would handle things like int sizes being different on the target and build systems.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Advancing day by day until it matches a second date
    By nhubred in forum C++ Programming
    Replies: 1
    Last Post: 05-30-2009, 08:55 AM
  2. Checking array for string
    By Ayreon in forum C Programming
    Replies: 87
    Last Post: 03-09-2009, 03:25 PM
  3. Date program starts DOS's date
    By jrahhali in forum C++ Programming
    Replies: 1
    Last Post: 11-24-2003, 05:23 PM
  4. CDate Class - handle date manipulation simply
    By LuckY in forum C++ Programming
    Replies: 5
    Last Post: 07-16-2003, 08:35 AM