LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-01-2009, 06:12 PM   #1
fhsm
Member
 
Registered: Jan 2009
Posts: 51

Rep: Reputation: 17
Microsoft Visual C++ vs G++, can I take the class?


I have found a job that I'd LOVE to get. One problem is they require a formal course in C++. Reasonable or not that's the way it works.

I've found a inexpensive class that will covers the HR issue. Unfortunately the course requires "Microsoft Visual C++ Express Edition." I use Vim and g++. I only have a linux system. Buying and installing Windows would significantly add to the price (and offensiveness) of the course. The course includes NO gui development.

Is this requirement even possible to enforce? Are the two compilers that different? Seems to me that if I'm just turning in *.cpp, I change the line breaks and no one will ever know how I made it. Am I missing some big amazing "feature" of VC++?
 
Old 05-01-2009, 06:21 PM   #2
dmail
Member
 
Registered: Oct 2005
Posts: 970

Rep: Reputation: Disabled
Quote:
The course includes NO gui development.
C++ has no knowledge of a gui, this is something which you/or someone makes with the language or a binding to another language.
Quote:
Is this requirement even possible to enforce?
Sure it is there course.
Quote:
Are the two compilers that different?
G++ and Visual Studio are completely different things, one is a compiler and the other is a IDE. Visual Studio can be set up to use pretty much any C++ compiler that will run on windows which includes g++.


Quote:
Buying and installing Windows would significantly add to the price (and offensiveness) of the course.
I may not come to this, speak to the powers that be and find if it is really a requirement. If it is then see if they have a Microsoft student program from which you may be able to get the OS for free, if not then you could cross compile.

Last edited by dmail; 05-01-2009 at 06:26 PM.
 
Old 05-01-2009, 06:27 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
Presumably, the employer is using Visual C++. Okay, if you call them and they say "no" to the reasonable question of "will experience in g++ do?", then go ahead and take the training. (Anything that will make them happy.)

I would call and talk to someone (not just in HR) if you possibly can, because if you've got experience in g++ they may be just fine with that. (Probably, they're trying to weed-out people who actually do not even know what C++ is, and who are merely bluffing. Or lying.)

Having said that ... it is useful to know as much as possible about the actual compiler environment that the employer will be using. Even though the C++ language is standardized, implementations are not, and the operating-system environments in which programs actually run are all different.
 
Old 05-01-2009, 06:38 PM   #4
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

IMHO, every professional developer who does any programming with Windows should be conversant with MS Visual Studio.

Also (and just FYI) ...
... trying to write even a "vanilla", hello-world type program in C/C++ with the latest/greatest MSVC (Visual Studio 2008) can be an eye-opening experience. For example, you won't necessarily have a "main()". Or you might get compile errors trying to use "strlen()". Which you might fix by having to substitute "wcstrlen()". And so on.

Bottom line: G++/vi and MSVC are very different tools (even though they nominally accomplish "the same thing"). And Linux vs. Windows can be radically different programming universes (despite having a "C++ Standard"). If a potential employer is using Windows and MSVC, it would definitely behoove you to familiarize yourself with Windows and MSVC.

.. PSM

Last edited by paulsm4; 05-01-2009 at 06:40 PM.
 
Old 05-01-2009, 06:52 PM   #5
dmail
Member
 
Registered: Oct 2005
Posts: 970

Rep: Reputation: Disabled
Quote:
You might get compiler depreciated warning trying to use "strlen()" (and you'll fix the warning by having to substitute "wcstrlen()" or using a define of _CRT_SECURE_NO_DEPRECATE, or a pragam directive or strnlen or strnlen_s ..... And so on.
Fixed
Actually it is a pain in the arse(Americans read fanny).

Last edited by dmail; 05-01-2009 at 06:55 PM.
 
Old 05-01-2009, 08:29 PM   #6
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hey, DMail -

Obviously you've been there/done that ;-)

I'm sure there are very good technical reasons for basically deprecating the entire standard C library ...

... but the fact remains: if you've come from using G++ pretty much exclusively ... you're probably going to be in for a rude surprise when you first sit down with a copy of MSVC++ ;-)

IMHO .. PSM
 
Old 05-01-2009, 11:18 PM   #7
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
I generally compile with -Wall -Wextra -Weffc++ -ansi -pedantic and pray that all those warnings and diagnostics will save me pain when I get around to try to compile it with VS.
 
Old 05-01-2009, 11:27 PM   #8
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
The only thing that'll spare you most of the warnings is using the Win32 API instead of anything portable. Even then, you're taking your chances ;-)
 
Old 05-02-2009, 07:22 AM   #9
fhsm
Member
 
Registered: Jan 2009
Posts: 51

Original Poster
Rep: Reputation: 17
The insanity of this is that it's a *nix / g++ shop. I just need to have my card punched.

I'm sure the course includes a copy of M VC++, or one can be had on the cheap. I should have more clearly stated the question as, given that c++ is theoretically a standard, how different are these two implementations. My hope was that VC++ was really just a fancy IDE and another implementation of the standard. If they differ from hello world on up (heck of a standard) then it sounds like it's time I say "hello, virtualbox!".
 
Old 05-02-2009, 09:34 AM   #10
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
You can download "Microsoft Visual C++ Express Edition" from Microsoft. I think it is free
http://www.microsoft.com/express/vc/
I looked around there for license details and didn't find them, but they do distinguish it in the FAQ from the "paid" version, so it seems to be free.

The C++ compiler in there can be run without the IDE. I haven't tried it under Wine, but I expect the C++ compiler can easily be run under Wine and I think all the required header files are either included or are free downloads.

If you're really not learning C++ at same time (just confirming you already know it), you are probably skilled enough to make the required adjustments to whatever they tell you to do, such that you could use Wine to run both the compiler and whatever it compiles.

It is possible you could even get the whole IDE to run under Wine. I'm sure someone has tried and you can find the details posted somewhere.

Even if there is no GUI in that course, they may do lame things like using Microsoft container templates instead of std::vector, std::map, etc. All that should work under Wine using the Microsoft header files and the Microsoft C++ compiler. That stuff may even work with just the Microsoft header files, using G++ and not using Wine.

The course might also do things with pipes or threads or exec'ing other programs, etc. which are different between Posix and Microsoft. I'm pretty sure all that would also work in Wine using the Microsoft headers and compiler. It would not work without Wine using G++ with just the Microsoft headers.

The Visual Studio IDE has powerful features to help you define and browse C++ classes. In all cases where I have used Visual Studio, those features haven't worked (because of the size and complexity of the class hierarchy). But in a simple course on C++, I'm sure everything would be done such that those features would work. They might instruct you in terms of those IDE features rather than the underlying C++ code. If you end up using the compiler in Wine without the IDE, everything can still work (those IDE features don't do anything extra. They just edit and browse the underlying C++ code). Assuming you already know the C++ class hierarchy concepts, you could listen to instructions about an IDE you don't use and easily translate to the underlying C++ code. If you were learning the class hierarchy concepts at the same time, it would be much harder to work with any difference in tools from those assumed by the instructor.

Quote:
Originally Posted by fhsm View Post
I have found a job that I'd LOVE to get. One problem is they require a formal course in C++.
I hope the job opening is real. In the current economy, many aren't real for various reasons. It would be unfortunate to pay time and money for a course you don't otherwise need for a job opportunity that is an illusion.

Last edited by johnsfine; 05-02-2009 at 10:26 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Stupid Question: Microsoft Visual Studio 6.0 (A.K.A. Visual Basic 6) Will it run? S0RD3N Linux - Software 8 05-07-2008 08:42 PM
LXer: A visual timeline of the Microsoft-Novell controversy LXer Syndicated Linux News 0 01-29-2007 12:54 AM
Microsoft 's visual studio development equivalence fro linux? lilzz Linux - Newbie 1 09-12-2006 04:26 PM
LXer: Mysql AB Becomes a Member of the Microsoft Visual Studio Industry ... LXer Syndicated Linux News 0 06-27-2006 07:54 AM
Microsoft Visual C++ 6.0 - Fatal install error lowpro2k3 General 1 01-19-2005 10:11 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration