CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Join Date
    Aug 2003
    Location
    Japan
    Posts
    146

    Good C++ compiler

    hello all

    which is the best C++ compiler to program.

    i mean 100 % ANSI Compliant C++ compiler.

    MS VC++ 6.0 is not ANSI compliant.

    what about MS VC++ 7.0 ???/

    Any other compilers??

    suggest me...
    "They can because they think they can" - Voltaire.

  2. #2
    Join Date
    Jul 2003
    Location
    Maryland
    Posts
    762
    MinGW with gcc 3.3.1 or MSVC++ 7 2003

  3. #3
    Join Date
    Nov 1999
    Location
    Beijing, P.R.China
    Posts
    115
    GCC from http://gcc.gnu.org/ and its Win32 port CYGWIN from http://www.cygwin.com/.
    If it helps you, thanks for rating.

  4. #4
    Join Date
    Aug 2001
    Location
    Sydney, Australia
    Posts
    813
    Borland is pretty good
    Microsoft LVP - Least Valuable Professional

    Please rate this post... Pleeeeeeaaassee!!!

  5. #5
    Join Date
    Aug 2000
    Location
    West Virginia
    Posts
    7,725
    check out Comeau front-end compiler (includes export support)

    http://www.comeaucomputing.com/index.html

  6. #6
    Join Date
    Aug 2003
    Location
    Japan
    Posts
    146

    ok

    what about

    Blood shed Dev - C++

    any idea?/


    I want to use Win32 API and C++ only.

    not MFCs .So i nee not MS VC7
    .

    for that which one is best

    ????
    Can i write Win32 programs under Borland?
    I have not used anything apart from MS


    but now i want to try...
    "They can because they think they can" - Voltaire.

  7. #7
    Join Date
    Aug 2000
    Location
    New Jersey
    Posts
    968
    VC++ 7.1 is very close to being 100% compliant.

    Don't bother with 7.0 version. It has a lot of the problems that 6.0 had.
    David Maisonave
    Author of Policy Based Synchronized Smart Pointer
    http://axter.com/smartptr


    Top ten member of C++ Expert Exchange.
    C++ Topic Area

  8. #8
    Join Date
    Aug 2003
    Location
    Japan
    Posts
    146
    i hesitate to believe MS C++ compiler now.

    Can Borland C++ or Dev-C++ serve my purpose??

    ???????????????

    to write Win32 programs (without MFC) !!!!
    "They can because they think they can" - Voltaire.

  9. #9
    Join Date
    Aug 2000
    Location
    New Jersey
    Posts
    968
    Can Borland C++ or Dev-C++ serve my purpose??
    Dev-C++ can do Win32 API code, but it will not have the same level of optimization that you can get with VC++ 7.1.

    I don't think Borland C++ is as compliant as VC++ 7.1.
    David Maisonave
    Author of Policy Based Synchronized Smart Pointer
    http://axter.com/smartptr


    Top ten member of C++ Expert Exchange.
    C++ Topic Area

  10. #10
    Join Date
    Oct 2003
    Posts
    4
    Originally posted by kumaru_san
    i hesitate to believe MS C++ compiler now.

    Can Borland C++ or Dev-C++ serve my purpose??

    ???????????????

    to write Win32 programs (without MFC) !!!!
    For me (Individually) It still depends on what programs you are writing...
    But since I have been using Borland C++ for a long time, I think B C++ can also serve your purpose and as you already knew Borland compiler is not a bad one right ?

  11. #11
    Join Date
    Aug 1999
    Location
    Wisconsin
    Posts
    507
    The latest (Nov. 2003) issue of Dr Dobb's Journal has
    an article on this very topic. According to that, the
    top compilers for ISO comformance are:

    Compiler %Passed
    ----------- -----------
    edg 3.2 99.70
    Comeau 4.3.2 99.55
    Intel 7.1 99.55
    PGCC 4.1-2 99.11
    VC++7.1 98.22
    gcc 3.3 96.14
    Borland 6.0 92.73
    Watcom 1.0 78.49

    Of course, ISO conformance is just one among many
    factors that you must consider when deciding which
    compiler is best.

  12. #12
    Join Date
    Aug 2003
    Location
    Japan
    Posts
    146
    thanks for the statistics..

    really great.

    i will choose according to that..

    thanks for all gurus replied so far.
    "They can because they think they can" - Voltaire.

  13. #13
    Join Date
    May 2000
    Location
    KY, USA
    Posts
    18,652
    [Moved thread]

  14. #14
    Join Date
    Aug 2000
    Location
    New Jersey
    Posts
    968
    Originally posted by kochhar
    The latest (Nov. 2003) issue of Dr Dobb's Journal has
    an article on this very topic. According to that, the
    top compilers for ISO comformance are:

    Compiler %Passed
    ----------- -----------
    edg 3.2 99.70
    Comeau 4.3.2 99.55
    Intel 7.1 99.55
    PGCC 4.1-2 99.11
    VC++7.1 98.22
    gcc 3.3 96.14
    Borland 6.0 92.73
    Watcom 1.0 78.49

    Of course, ISO conformance is just one among many
    factors that you must consider when deciding which
    compiler is best.
    Very good info!
    Is there a link for the above information?
    David Maisonave
    Author of Policy Based Synchronized Smart Pointer
    http://axter.com/smartptr


    Top ten member of C++ Expert Exchange.
    C++ Topic Area

  15. #15
    Join Date
    Jul 2003
    Location
    Maryland
    Posts
    762
    Originally posted by manbaum
    GCC from http://gcc.gnu.org/ and its Win32 port CYGWIN from http://www.cygwin.com/.
    CYGWIN is NOT the Win32 port of GCC.

    MinGW is the port of GCC to windows. Not saying CYGWIN is bad.
    Originally posted by kumaru_san
    what about

    Blood shed Dev - C++

    any idea?/
    Blood Shed is NOT a compiler. It is an IDE similar to how MSVC++ is. BloodShed uses MinGW with gcc 3.3 to compile, so the compiler it comes with is pretty **** good.
    Originally posted by kumaru_san
    I want to use Win32 API and C++ only.

    not MFCs .So i nee not MS VC7
    .

    for that which one is best

    ????
    Can i write Win32 programs under Borland?
    I have not used anything apart from MS


    but now i want to try...
    You can write win32 applications under anything.

    For 1, you may want to check out www.wxwindows.org which doesn't use the win32 API, it uses it's own which means it can be compiled on Linux, Windows, Mac OS X, ect...

    But if you really just want win32 application, you can compile it with MinGW, I'm sure borland and the others.

    To use the Win32 API, it isn't difficult. Here is a sample application, it's just a window and most of it is fairly self explainatory (this compiles on MinGW/BloodShed and MSVC++)
    Code:
    #include <windows.h>
    
    /*  Declare Windows procedure  */
    LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
    
    /*  Make the class name into a global variable  */
    char szClassName[ ] = "WindowsApp";
    
    int WINAPI WinMain (HINSTANCE hThisInstance,
                        HINSTANCE hPrevInstance,
                        LPSTR lpszArgument,
                        int nFunsterStil)
    
    {
        HWND hwnd;               /* This is the handle for our window */
        MSG messages;            /* Here messages to the application are saved */
        WNDCLASSEX wincl;        /* Data structure for the windowclass */
    
        /* The Window structure */
        wincl.hInstance = hThisInstance;
        wincl.lpszClassName = szClassName;
        wincl.lpfnWndProc = WindowProcedure;      /* This function is called by windows */
        wincl.style = CS_DBLCLKS;                 /* Catch double-clicks */
        wincl.cbSize = sizeof (WNDCLASSEX);
    
        /* Use default icon and mouse-pointer */
        wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
        wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
        wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
        wincl.lpszMenuName = NULL;                 /* No menu */
        wincl.cbClsExtra = 0;                      /* No extra bytes after the window class */
        wincl.cbWndExtra = 0;                      /* structure or the window instance */
        /* Use Windows's default color as the background of the window */
        wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;
    
        /* Register the window class, and if it fails quit the program */
        if (!RegisterClassEx (&wincl))
            return 0;
    
        /* The class is registered, let's create the program*/
        hwnd = CreateWindowEx (
               0,                   /* Extended possibilites for variation */
               szClassName,         /* Classname */
               "Testing Prog",       /* Title Text */
               WS_OVERLAPPEDWINDOW, /* default window */
               CW_USEDEFAULT,       /* Windows decides the position */
               CW_USEDEFAULT,       /* where the window ends up on the screen */
               544,                 /* The programs width */
               375,                 /* and height in pixels */
               HWND_DESKTOP,        /* The window is a child-window to desktop */
               NULL,                /* No menu */
               hThisInstance,       /* Program Instance handler */
               NULL                 /* No Window Creation data */
               );
    
        /* Make the window visible on the screen */
        ShowWindow (hwnd, nFunsterStil);
    
        /* Run the message loop. It will run until GetMessage() returns 0 */
        while (GetMessage (&messages, NULL, 0, 0))
        {
            /* Translate virtual-key messages into character messages */
            TranslateMessage(&messages);
            /* Send message to WindowProcedure */
            DispatchMessage(&messages);
        }
    
        /* The program return-value is 0 - The value that PostQuitMessage() gave */
        return messages.wParam;
    }
    
    
    /*  This function is called by the Windows function DispatchMessage()  */
    
    LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
    {
        switch (message)                  /* handle the messages */
        {
            case WM_DESTROY:
                PostQuitMessage (0);       /* send a WM_QUIT to the message queue */
                break;
            default:                      /* for messages that we don't deal with */
                return DefWindowProc (hwnd, message, wParam, lParam);
        }
    
        return 0;
    }

Page 1 of 2 12 LastLast

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