MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Flat Mode Flat  

Vas Crabb
BOFH
Reged: 12/13/05
Posts: 4462
Loc: Melbourne, Australia
Send PM
MSVC sucks so bad!
03/02/09 01:44 PM


What is wrong with that piece of crap? Now I'm not a one-compiler man - I build the same code with GCC and SunPRO every day, so I'm used to working around bugs, quirky behaviour and subtle differences in libraries. But I always dread porting anything to MSVC! It's the biggest time-waster there is!

What's with ? The C++ specification says that "and", "or" and "not" are keywords, so why can't MSVC act like it? (I personally don't use them, but plenty of people who spend a lot of time doing Python just use them without thinking.)

Why do , , etc. pollute the global namespace? GCC and SunPRO manage to do it cleanly, just putting the names in the std namespace, but the MSVC headers first put the stuff in the global namespace, then suck it into namespace std with using statements. What's the point of that?

On top of this, it's possible to get MSVC into a state where you can't include cstdlib just with its own headers. It's also possible to get winsock.h and ws2def.h to conflict with each other, once again purely by including supplied headers. What kind of compiler chokes on its own supplied headers?

Why can't it deal with anonymous namespaces properly? If you put an anonymous namespace inside a namespace, the symbols should still be in the containing namespace - they just shouldn't be exported. But MSVC disagrees - it thinks that any anonymous namespace puts names into the global namespace irrespective of any containing namespace. That just makes code messy!

And finally, there's the inconsistent behaviour of dllexport and dllimport: if you simply declare a class __declspec(dllexport) in the library that implements it and use the appropriate #pragma comment to indicate the library name, modules that use it will import methods automatically. But not static data members. Oh no - for that to work, you need to explicitly declare the class __declspec(dllimport) in the module that uses it. Why the inconsistency? Why can't it do the same thing for both methods and data members?

I've now wasted three days at work just trying to get a bunch of stuff to compile and link on Windows. I'm so over it!







Entire thread
Subject Posted by Posted on
* MSVC sucks so bad! Vas Crabb 03/02/09 01:44 PM
. * Re: MSVC sucks so bad! keshbach1  03/04/09 10:26 PM
. * Re: MSVC sucks so bad! Vas Crabb  03/04/09 11:39 PM
. * Re: MSVC sucks so bad! FMecha  03/15/09 06:00 AM
. * Re: MSVC sucks so bad! Vas Crabb  03/15/09 06:29 AM

Extra information Permissions
Moderator:  Pi 
0 registered and 109 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 4083