Find the answer to your Linux question:
Results 1 to 5 of 5
Like Tree2Likes
  • 2 Post By alf55
I'm a student with some experience in C++ using windows vs2010. The course I'm taking now, data structures using C++, is using the Linux environment. I'm having trouble with the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2012
    Posts
    9

    Visual Studio C++ != Linux C++


    I'm a student with some experience in C++ using windows vs2010. The course I'm taking now, data structures using C++, is using the Linux environment. I'm having trouble with the transition. Compiling and linking a .h, main.cpp and a makefile, which is new to me until last week, is what I need help with. I'm wanting to use the vim editor because I have previous experience using it in an assembly language course. My data structures professor only uses the emacs editor. He only supports and teaches emacs but will allow you to use whatever you like. I'd rather use vim. I'm looking for a good resource, that doesn't start with hello world, to teach C++ using Linux. Advanced C++ using Linux as a beginner I guess you could say. Any suggestions would be greatly appreciated. Thank you in advance.

  2. #2
    Linux Enthusiast
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    636
    Visual Studio C++ is not "Standard C++". The Gnu C++ follows the standards. Since you seem to need an IDE, you should look at using Eclipse (also available for MS OS environments as well). Any C++ book (not Microsoft C++ which is non-standard) would help. The C++ books that I have are about the language and do not talk about such things as editors, make (or ant), or using an IDE such as Eclipse. The only book that I have seen for Eclipse is written for the MS environment.

    Goto the the GNU Manuals page )GNU Manuals Online - GNU Project - Free Software Foundation) for manuals for:
    • GCC (GNU Compiler Collection)
    • Make
    • GDB (The GNU debugger)
    • DDD (GUI front-end to may debuggers including gdb)
    • GNU C reference manual

    And other.

    Also there is a GUI version of VIM as well (sometimes gvim and other times xvim).
    frostyshade and Roxoff like this.

  3. #3
    Linux Engineer docbop's Avatar
    Join Date
    Nov 2009
    Location
    Woodshed, CA
    Posts
    926
    I used to do C++ support at Borland and none of the compilers fully follow the standard they all vary here and there. Bottom line you have learn whatever tools you use their advantages and how to use their weaknesses to your advantage.

    Is the teacher limiting you to text editors or can you use GUI editors. Like you I was never a fan of EMAC like editor guess because I grew up with vi. Most the time I just work with GUI editor and termial window to do my compiles in. Lately been using Geany editor, but there are a lot if you look around.

  4. #4
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,865
    Well, I found a simple introduction to using makefiles and make, this is probably what you need to get going with.

    GNU Make in Detail for Beginners - LINUX For You

    As far as using vim or emacs is concerned, it's a personal choice. The emacs package is hugely capable, but it really is the package that the term 'bloatware' was invented for. Vim is quirky, and hugely powerful - but takes time to get your head around.

    It doesn't really matter which you use - it's the output files that are important. They're all in plain text too, so you're not tied into some proprietary .vcproj format for your build targets.
    Linux user #126863 - see http://linuxcounter.net/

  5. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,517
    Myself, I like the nedit gui editor - nice syntax highlighting for most languages known, good multi-file/multi-tab (detachable) support, and a superb search/replace functionality. The closest thing to it in the Windows world is the notepad++ editor. That and Make/gcc/g++ etc are all I need. I have used Eclipse, but I'd rather keep things simple, though as an IDE Eclipse is pretty good. My friends at QNX Software wrote the CDE (C/C++ Development Environment) for Eclipse.

    FWIW, Roxoff's link is pretty good for a newbie. Also, I have been writing Makefile's for complex hierarchical systems for about 30 years. I always advise to adhere to the KISS principle!
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •