CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 13 of 13
  1. #1
    Join Date
    Dec 2007
    Posts
    8

    Question Good C++ Linux/Unix Terminal in Windows XP Professional

    I need to know a good Linux/Unix terminal that can run on Windows XP Pro so I can start coding in C++. Does anyone have any suggestions??

    I do NOT want anything like Visual C++ or anything similar to that. I like the command line terminals, something like puTTY without the internet connection so that I can use Vi editor or pico or etc.

    I have no idea how this works, if I'm not making any sense please feel free to teach me a thing or two about how terminals (not even sure if that is the correct word) run on the OS and such... Thanks.

  2. #2
    Join Date
    Aug 2005
    Location
    LI, NY
    Posts
    576

    Re: Good C++ Linux/Unix Terminal in Windows XP Professional

    All compilers for Windows that I know of can be invoked through the command prompt, which is Windows' CLI/terminal. I haven't the foggiest idea why you would want to use a CLI-based text editor, but I'm sure there is one available for Windows.

    Anway, why not just install Linux? Most Windows developers have embraced GUIs as a less masochistic way of interacting with a computer, so you won't find many CLI-based tools for Windows that aren't ports of POSIX applications.
    - Alon

  3. #3
    Join Date
    Dec 2007
    Posts
    8

    Re: Good C++ Linux/Unix Terminal in Windows XP Professional

    Quote Originally Posted by Hermit
    All compilers for Windows that I know of can be invoked through the command prompt, which is Windows' CLI/terminal. I haven't the foggiest idea why you would want to use a CLI-based text editor, but I'm sure there is one available for Windows.

    Anway, why not just install Linux? Most Windows developers have embraced GUIs as a less masochistic way of interacting with a computer, so you won't find many CLI-based tools for Windows that aren't ports of POSIX applications.

    I liked Visual C++ but became more accustomed to pico/nano/v editor with PuTTY.

    Can you suggest something better than Visual C++? Better as in compatibility and most recent compilers and such. I guess I'll try the GUI type of applications.

  4. #4
    Join Date
    May 2007
    Posts
    811

    Re: Good C++ Linux/Unix Terminal in Windows XP Professional

    Visual C++ (2005) provides one of the better C++ compatibility up there for Window environment.

  5. #5
    Join Date
    Dec 2007
    Posts
    8

    Re: Good C++ Linux/Unix Terminal in Windows XP Professional

    Quote Originally Posted by STLDude
    Visual C++ (2005) provides one of the better C++ compatibility up there for Window environment.
    I actually didn't like Visual C++ because every time I wanted to use a datastructure and use cstdlib, I would get errors and the programs would not compile.

    I think it wouldn't recognize:

    #include <cstdlib>

    return EXIT_SUCCESS;

    I would get errors for trying to do this. Am I missing some kind of library??

  6. #6
    Join Date
    May 2007
    Posts
    811

    Re: Good C++ Linux/Unix Terminal in Windows XP Professional

    Quote Originally Posted by onlycuriouscpp
    I actually didn't like Visual C++ because every time I wanted to use a datastructure and use cstdlib, I would get errors and the programs would not compile.
    This is not an answer. There always will be problems with setting up compiler environment and it has some steep learning curve. Changing to other product might not solve anything.
    Also, you will have issues later when there are compiler errors, so you have to learn how to deal with those.


    This is not valid C++ code, so no wonder that did not compile.
    Quote Originally Posted by onlycuriouscpp
    I think it wouldn't recognize:

    #include <cstdlib>

    return EXIT_SUCCESS;

    I would get errors for trying to do this. Am I missing some kind of library??
    This is minimum:
    Code:
    int main()
    {
    }
    Last edited by STLDude; December 20th, 2007 at 08:11 PM.

  7. #7
    Join Date
    Dec 2007
    Posts
    8

    Re: Good C++ Linux/Unix Terminal in Windows XP Professional

    Quote Originally Posted by STLDude
    This is not an answer. There always will be problems with setting up compiler environment and it has some steep learning curve. Changing to other product might not solve anything.
    Also, you will have issues later when there are compiler errors, so you have to learn how to deal with those.


    This is not valid C++ code, so no wonder that did not compile.


    This is minimum:
    Code:
    int main()
    {
    }
    I said it didn't compile when I used cstdlib, I was not giving you the code.

    I was trying to use cstdlib for EXIT_SUCCESS, which does not work in Visual C++ from my past experience.

    EDIT: Now that I read my post I can see it is a bit ambiguous... Try using cstdlib and try returning EXIT_SUCCESS at the end of the program, it doesn't work in VISUAL C++.

  8. #8
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Good C++ Linux/Unix Terminal in Windows XP Professional

    Quote Originally Posted by onlycuriouscpp
    EDIT: Now that I read my post I can see it is a bit ambiguous... Try using cstdlib and try returning EXIT_SUCCESS at the end of the program, it doesn't work in VISUAL C++.
    What version of Visual C++ are you using? It compiles fine with Visual C++ 2003.

    If you're using Visual C++ 6.0, that is a pre-ANSI standard compiler, and shouldn't be used for testing whether ANSI C++ code is valid.

    Also, here is the real code:
    Code:
    #include <cstdlib>
    
    int main()
    {
        return EXIT_SUCCESS;
    }
    Edit: BTW, the code compiles on Visual C++ 6.0 also.

    Regards,

    Paul McKenzie
    Last edited by Paul McKenzie; December 20th, 2007 at 10:21 PM.

  9. #9
    Join Date
    May 2007
    Posts
    13

    Re: Good C++ Linux/Unix Terminal in Windows XP Professional

    Use cygwin. It contains most of the tools that you accustom to (vi, emacs, gcc, gdb, etc). It is basically a linux like environment that runs on a windows platform.

    I think that this is exactly what you are looking for.

  10. #10
    Join Date
    Dec 2007
    Posts
    8

    Re: Good C++ Linux/Unix Terminal in Windows XP Professional

    ***... it does work... it didn't work for me about 1 year ago when I tried to do this 10000 times. But the exact code worked in PICO/g++. Weird.

    Anyway, thanks everyone.

  11. #11
    Join Date
    Oct 2006
    Location
    Singapore
    Posts
    346

    Re: Good C++ Linux/Unix Terminal in Windows XP Professional

    As far as I know, there are two Linux-like POSIX compliant environments that you can use on Windows.
    1. Cygwin
    2. MSYS

    I haven't really tried nano with them but that text editor should work.
    Also, if you are looking for an alternative to MSVC, try KDevelop, Anjuta or Code::Blocks for Linux. I use KDevelop and its a really nice IDE. Hope this helps.
    Last edited by angelorohit; December 21st, 2007 at 03:28 AM.
    Believe in your Dreams, Work for what you Believe in.
    My thoughts? Angelo's Stuff
    Some fun things I've done: RayWatch, QuickFeed, ACSVParser

    @ngelo

  12. #12
    Join Date
    Jan 2004
    Location
    Düsseldorf, Germany
    Posts
    2,401

    Re: Good C++ Linux/Unix Terminal in Windows XP Professional

    I think you want to install cygwin and spend some time setting up the X-Server and xterm. In fact I am using an xterm as my main command prompt in WinXP, and I use vi and g++ to compile quick and dirty tests.

    See the picture for what I mean.
    Attached Images Attached Images
    More computing sins are committed in the name of efficiency (without necessarily achieving it) than for any other single reason - including blind stupidity. --W.A.Wulf

    Premature optimization is the root of all evil --Donald E. Knuth


    Please read Information on posting before posting, especially the info on using [code] tags.

  13. #13
    Join Date
    Mar 2004
    Posts
    235

    Re: Good C++ Linux/Unix Terminal in Windows XP Professional

    I think you want TerraTerm

    Windows terminal is so poor it doesn't do tab tab enumeration. Fortunatly it does the single tab completion.

    VIM is great .
    01101000011001010110110001101100011011110010000001110011011001010111100001111001

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