Thread: UNIX and C++

  1. #1
    Unregistered
    Guest

    Question UNIX and C++

    I hope someone can suggest me something....
    here's my problem; I've made a huge DOS program in my PC using C++ and MS Visual C (V.6), but now I need to port it up to a Compact Unix 64 bit Alpha station. But it happends that I have only a C compiler installed there.
    *¿Is there any app to automatically convert C++ to C?
    *¿Is there any free =) C++ compiler for that kind of UNIX?
    *¿can I build the exe from my PC?

    I would apresiate any help,
    thanks.

  2. #2
    Registered User Sekti's Avatar
    Join Date
    Feb 2002
    Posts
    163

    ummm

    g++ should work on it im not sure though
    +++
    ++
    + Sekti
    ++
    +++

  3. #3
    Registered User
    Join Date
    Aug 2001
    Location
    computers/ theatre, travelingstudentL>- Northern California NativeNorthern California3D&Tie-DyeStudent1>. Admirer of C Bangalore Net surfingTeacher >/ >0 nagpurteaching >1  >2
    Posts
    61
    >Is there any free =) C++ compiler for that kind of UNIX?
    Lots of them, just search the web.

    >can I build the exe from my PC?
    NO.

    If it is ANSI compliant, it should build on the Alpha system. If you included any windows OS specific header files, you will need to replace them with the UNIX equivalent. Any os specific function calls will also need to be replaced.

    A good practice is to keep all os specific functions in a single library. That way when you port to a different OS, you only need to change the code in one library. This is from experience, I have ported code written on IRIX 6.5 to Solaris 8 and Linux.

  4. #4
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    Have you tried GCC? It has a C++ compiler package within it. I'm not sure if it has ports to your system, but it has a lot of ports. Take a look at gcc.gnu.org.

Popular pages Recent additions subscribe to a feed