Advertisement

stupid VC++ 6 compiler

Started by May 30, 2000 10:17 PM
24 comments, last by Theses 24 years, 7 months ago
felisandria: VC also provides a "Clean" command on the Build menu, which you could try. I''m not sure what it does yet but the status bar told me it cleans all the temporary (i.e., regeneratable) files in the project.


There are only two problems that I have run into using VC. One is not VC''s fault, and the other is the fault of the compiler programmers.

1) When my computer occasionally locks up (due to DX/development stuff) and I must hit the dreaded reset button, and reboot w/ scandisk. After I have booted into Windows, VC will sometimes fail to build the code properly. Sometimes I get obscure errors like "the value of a register was not saved properly across a function call" when all I''m doing is calling a simple C++ class member function. Cleaning and rebuilding everything does not solve this problem, but creating a new project without modifying any of the source does solve it. Actually, this is the fault of the write-caching of the drive and has no relation whatsoever to VC specifically.

2) ANSI standard support. Everytime I learn about a feature, VC doesn''t support it yet. *sigh*


Remember, ~99.99% of computer problems is user error.


quote: Original post by Anonymous Poster

Think that''s bad? I just added a single word variable to my class, recompiled it, and my whole program crashed. For some reason, it didn''t like it. I guess the compiler probably tried to re-align my class and messed up my other variables. Now I always try to keep my classes dword align, otherwise I have no idea what MSVC is going to do with it.


If your program was depending on the alignment of the variables in the class, you should either re-write it using a different method or use the #pragma pack to make sure it is aligned properly. Otherwise, what you are doing is bad code on any compiler/platform and not guaranteed to run properly.


quote: Original post by Kylotan

Another thing to check when Visual Studio barfs in the weirdest of ways: Open your resource.h file, and check for negative(!!!) resource IDs.

I''ve seen this happen, and NOBODY could explain why, but it sure gives weird bugs.


I''ve had that happen, too. I bet it has something to do with manually assigning resource ID values in the editor, or changing resource ID names in the editor but not your source code and re-compiling.



- null_pointer
Sabre Multimedia
null : have you seen how it quoted me as being Kylotan? Hmm, even the message board is confused about my identity *grin*

Who am I???


#pragma DWIM // Do What I Mean!
~ Mad Keith ~
It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.
Advertisement
null_pointer, that last quote you attributed to me was actually from MadKeithV, btw

''Clean'' in MSVC just deletes all your object files, like ''make clean'' tends to do if you use makefiles. However, this is a last resort when your full builds take 20 minutes like mine do!

I agree that the lack of support for the standard in Visual C++ can be frustrating. The erroneous scoping of variables declared in a for statement annoys me the most as it stops me using cut and paste with my loops You can see their reasoning though in many cases: changing new to throw an exception instead of returning NULL would nuke lots and lots of old code that relied on NULL to indicate lack of memory.

Some of the new standard features are actually available, yet disabled by default: try clearing the ''Enable Microsoft extensions'' check box. However, this tends to remove extensions you ''need''. For instance, it prevents me using the STL that comes with Visual C++. I tried using STLPort instead but that produces compiler errors. I can''t win! There should really be a ''Microsoft C++'' dialog which allows you to pick and choose which ''extensions'' you want.

Theses : sorry for hijacking your thread
null: I believe "Clean" is just for the .obj files and whatever .exe and .dll you happen to have built... regardless, if the compiler is screwed up to the point at which I''m going to start deleting temp files, I want total control.

The .clw file rebuild is actually documented in the MSDN libraries. The .aps rebuild isn''t, but is a process we had to work out at my last job due to versioning information getting lost when trying to script things.

-fel
~ The opinions stated by this individual are the opinions of this individual and not the opinions of her company, any organization she might be part of, her parrot, or anyone else. ~
MadKeithV, Kylotan: hehe too much typing in the Exceptions... thread:
&ltquote>&lti&gtOriginal post by Kylotan</i>
</quote>


felisandria: I''ve had to do the .CLW file delete more times than I can count. The MFC wizards and editors in VC do too much and not enough. I wish the MSVC team would make up their mind how much support to include.



- null_pointer
Sabre Multimedia
Generally, I''ve liked Visual C++ as one of the few Microsoft programs that has focused on doing the job properly rather than their usual trick of just adding hundreds of half-tested features. Sadly, it seems even VC is going the same way as the rest, with most changes being to the GUI and the wizards, with few fixes behind the scenes apparently.

Still, at least the main code editing window is intuitive, unlike C++ Builder''s (which likes to think all tabs are spaces in disguise, or that I really need to be able to place the cursor way out in whitespace many characters to the right of the actual code, or that selecting entire lines is a rare occurence and therefore only providing a tiny space for me to click the mouse in to do it is enough... Etc.)

This topic is closed to new replies.

Advertisement