MSVS's preprocessor vs gcc's preprocessor

Started by
68 comments, last by 4mad3u5 10 years ago

There's a fully compiled example here for vs 2010, and before you tell me vs is crap like in you other posts, well it's not, and at least you don't have to work with the command line, which is IMO really, really outdated (i dont get why ppl still compile in command line for anything except assembly...)

I'm sorry I did not know the opengl community was so sensitive to talking bad about microsoft, I am new and it will not happen again.

To be fair this is more my own personal rant than the general opinion ( a lot of ppl here use gcc and i just don't get why tbh...)

Advertisement

To be fair this is more my own personal rant than the general opinion ( a lot of ppl here use gcc and i just don't get why tbh...)

Why would you use MS C++ compiler if you could gcc inside of the visual studio IDE? That's right, you wouldn't. The MS compiler is slightly behind, and not multiplatform. smile.png

The counter point is that the MS IDE is absolutely the best - hands down. But I prefer to program in the # languages for that.

I have no problems using ANY OTHER IDE out there for general C++, such as CodeLite. (which actually has ctrl+space btw, although it is really bad.. hehe)

( a lot of ppl here use gcc and i just don't get why tbh...)


I use MSVC at work. It's an important skill to keep up when you intend to earn your living in this area.

However, for my own projects I'm using gcc. I do, however, never use the command line (unless I need to compile some external libraries, but running 'make' in directory would hardly qualify as really working with the command line). There are plenty of IDEs available to pick from, personally I have come to like QtCreator after a few initial difficulties. In the grand overall I would actually consider it more useful for my needs than MSVC, with the sole exception of debugging.

That said, there are ample reasons to pick the gcc compiler over the MSVC compiler. Most of them have to do with the suboptimal (to avoid saying 'non-existing' in areas) C++11 support. In a time where C++14 becomes very relevant Microsoft's flag ship compiler still avoids some areas of C++11. Also, gcc makes your life easier writing standard compliant code, especially if you crank the warnings up.
Additionally I have a decade or two experience with various flavors of MSVC IDEs. Getting used to a new version does not take a lot of time with previous experience (the most important learning step I had to go through for MSVC 2012 was googling how the hell you get rid of the CAPSLOCK in the menus).
On the other hand my work project needs to work on Windows, Macs and two kinds of smartphones (both working with gcc or the extremely similar clang). And while I'm currently only needed in the Windows-part, it's nice to keep some emergency skills ready.

Also, both the work project and my personal projects use CMake. Should I decide I need to switch out the compiler it's taking a few minutes to generate a new suitable project file for the new target compiler/IDE (some more time to rebuild all required dependencies might be needed).

There's a fully compiled example here for vs 2010, and before you tell me vs is crap like in you other posts, well it's not, and at least you don't have to work with the command line, which is IMO really, really outdated (i dont get why ppl still compile in command line for anything except assembly...)

I'm sorry I did not know the opengl community was so sensitive to talking bad about microsoft, I am new and it will not happen again.

Nobody's sensitive to talking bad about Microsoft. What people don't like is FUD and misinformation; there are plenty of reasons to talk bad about Microsoft concerning some of the bizarre and seemingly brainless things they do, but the fact remains that VS is still, and by a large margin, the best IDE you can get. So if you're going to talk bad about Microsoft, or Oracle, or the FSF, or the OpenGL ARB, or any other organization, it pays to stick to the facts and leave one's prejudices at the door. On the other hand if you're going to say stuff like "I hate Microsoft because EVIL EVIL EVIL" you'd better be prepared to back it up, otherwise people are going to assume that you're just trolling or trying to start a flame war (and any valid point you may be trying to make will get lost as a result - which I'm sure is a result you don't want).

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

There's a fully compiled example here for vs 2010, and before you tell me vs is crap like in you other posts, well it's not, and at least you don't have to work with the command line, which is IMO really, really outdated (i dont get why ppl still compile in command line for anything except assembly...)

I'm sorry I did not know the opengl community was so sensitive to talking bad about microsoft, I am new and it will not happen again.

"I hate Microsoft because EVIL EVIL EVIL" you'd better be prepared to back it up, otherwise people are going to assume that you're just trolling or trying to start a flame war (and any valid point you may be trying to make will get lost as a result - which I'm sure is a result you don't want).

This was never said, I don't care it wasn't, I might have nonchalantly said they want your money; however, for a beginner who every single book he reads says microsoft is trying to kill opengl, wondering why I should use msvs is a pretty good question. And even to this day my instructor because I haven't brought a counter point to him, believes that because msvs express 2008 has a date on it that they might discontinue it and we won't know how to use another platform and we would all have to pay microsoft. This isn't just some flamebait statement even though it might have came out that way, this is stuff I talk to instructors about all the time.

You are currently sitting in several distinct holes:

(1) you appear to be learning your first programming language

(2) you are learning C++

(3) you are trying to use the non-default compiler for your platform

(4) you are trying to work with an API you don't know yet

(5) you are trying to work with a library of a 3rd party

Now, ideally you want to limit the number of holes you are in at the same time. Especially hole (1) does not really interface well with other holes. Personally I think combining holes (1) and (2) is not a good idea, but apart from a friendly warning (consider it given) I will not stand in anyone's way.

I won't go into extensive discussions about the merits and future of free Express Editions of MSVC. To be honest, I don't really care and at this point neither should you. What you produce at this point is not worth keeping. I don't say this because I believe you are stupid or because I try to be unkind. I say that because learning C++ takes time. If Microsoft shuts down MSVC Express a year from now and none of your code works on other compilers you have not really lost anything.

You did gain a little bit of proficiency in the language though. Enough to try your hands at hole (3) for example. That's an interesting hole. It's annoying at first but with sufficient understanding of how your tools are supposed to work and a bit of googling it's solvable.

I would strongly advise that every decent programmer tries their hand at hole (3) - once it is in their skills. But that is something you have to solve/research yourself. If you have to run onto a forum without any idea what's happening, it's too early.

You are currently sitting in several distinct holes:

(1) you appear to be learning your first programming language

(2) you are learning C++

(3) you are trying to use the non-default compiler for your platform

(4) you are trying to work with an API you don't know yet

(5) you are trying to work with a library of a 3rd party

Now, ideally you want to limit the number of holes you are in at the same time. Especially hole (1) does not really interface well with other holes. Personally I think combining holes (1) and (2) is not a good idea, but apart from a friendly warning (consider it given) I will not stand in anyone's way.

I won't go into extensive discussions about the merits and future of free Express Editions of MSVC. To be honest, I don't really care and at this point neither should you. What you produce at this point is not worth keeping. I don't say this because I believe you are stupid or because I try to be unkind. I say that because learning C++ takes time. If Microsoft shuts down MSVC Express a year from now and none of your code works on other compilers you have not really lost anything.

You did gain a little bit of proficiency in the language though. Enough to try your hands at hole (3) for example. That's an interesting hole. It's annoying at first but with sufficient understanding of how your tools are supposed to work and a bit of googling it's solvable.

I would strongly advise that every decent programmer tries their hand at hole (3) - once it is in their skills. But that is something you have to solve/research yourself. If you have to run onto a forum without any idea what's happening, it's too early.

1) Well I am not learning my first language, I am just learning opengl and have never use libraries in this way before, which opengl makes you do. Working with a language is completely different than working with libraries, I am trying to tap into header files that have dependencies, I have never seen this in a language but I am sure it happens. And I have never seen a language that doesn't have header files that work because they are from a third party. Which is a hug difference between that and say C, C++, Assembly, LISP, Java, visual basic.net, or any other type of programming I have done. I would have to say since you are not making the distinction between working with a language and working with libraries I don't think you are understanding the situation, which leads to you irrational conclusion of me learning my first language.

The whole "Microsoft is trying to kill OpenGL" thing is a classic example of the FUD and misinformation I referred to. The OpenGL vs D3D war is something that everybody is incredibly tired of; it's really not worth going over in detail, but the brief summary is:

  • Microsoft wanted OpenGL for NT workstations in order to be able to compete with Unix workstations.
  • The OpenGL group at Microsoft refused to play ball with the games people, so the games people needed a new 3D API.
  • Hence Direct3D was born.
  • Microsoft's flagship OS at the time - Windows NT4 - didn't even support Direct3D, but it did support OpenGL.
  • Direct3D "won the API war" by virtue of offering better tools, better support, more robust drivers and more consistent behaviour across a wider range of hardware.
  • The OpenGL ARB did more damage to OpenGL by messing up two consecutive major versions at critical time periods (the switch from fixed to programmable, and the Vista debacle).

Microsoft is not currently "trying to kill OpenGL" because that battle is long over. If your instructors are claiming otherwise, then they're working from information that was last current back in 1998 or so, and I'd strongly advise them to update their knowledge. A common failing of academics (or anyone that's not hands-on with a technology on a day-to-day basis in the real world) is that the real world moves on but their own knowledge and experience doesn't.

A great source of information on the whole sorry mess is Alex St John's blog; in case you don't know, Alex was a principal designer and lead on the early versions of DirectX, so in other words he was there at the time and has first-hand knowledge of exactly what was happening inside Microsoft while it was happening. He was also fired from Microsoft in the late 90s, so is in a position where he can now say what he likes without any paymaster pulling his strings.

Posts containing "OpenGL"

"The DirectX Files"

Regarding Microsoft themselves, for the past 10 or so years what they've actually been trying to kill has not been OpenGL; they've actually been trying to kill Direct3D instead. They've been trying to kill it by artificially tying it to unpopular Windows versions, by degrading the quality of their documentation and tools, by introducing breaking changes in other unrelated Windows components, by messing up their PC gaming strategy, by generally behaving as if they haven't a clue what they're doing.

So hence the fact that any claim that "Microsoft is trying to kill OpenGL" is in reality quite ridiculous, and it would be really good (not to mention of more benefit to you) if you'd stop such claims.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

So hence the fact that any claim that "Microsoft is trying to kill OpenGL" is in reality quite ridiculous, and it would be really good (not to mention of more benefit to you) if you'd stop such claims.

Man can you not read, I said "however, for a beginner who every single book he reads says microsoft is trying to kill opengl, wondering why I should use msvs is a pretty good question". This is a statement saying where I am coming from. I am not saying this: "So hence the fact that any claim that "Microsoft is trying to kill OpenGL" is in reality quite ridiculous, and it would be really good (not to mention of more benefit to you) if you'd stop such claims.". I look at details just as much as you guys and I am getting a little pissed off you can't read.

You are currently sitting in several distinct holes:

(2) you are learning C++

Wait have I even asked about the C++ language, no not ever. Have I been asking about opengl header files and libraries, umm yes the entire time.

This topic is closed to new replies.

Advertisement