- Dec 30, 2002
- 5,747
- 1
- 81
I've been having homicidal thoughts involving myself, the employment roster of Borland, and a rusty spoon.
I suppose I should state from the outset that this isn't a software help request, although if you know the answer I would love you to death (not with a rusty spoon though.
) I mostly just want to rant.
We use Borland to compile one of our slot OSs at work. This morning my project compiled. Then I made the mistake of adding a BOOL variable to my class (keep in mind that there were already other BOOLs declared in that same class) and it stopped working. The linker would hang in an infinite loop. After a little investigation it turns out that it was one function that was the culprit. If I used the variable in that function, the linker hung. If I used it anywhere else, it was fine.
Since I can't actually post the code without being fired
() here is a stripped down approximation
There is absolutely no reason for it to work like this. I tried renaming the variable. I changed it's type. I made it global to the file outside my class. Nothing worked.
The workaround? To use a set/get function on the variable so I'm not directly accessing it in the function.
:|:|:|:|

.....
The only deduction I can come to is that the compiler was written by an insane monkey. I'd really hate to have to murder that monkey with a rusty spoon, but if I ever met him on the street I would be forced to.
I suppose I should state from the outset that this isn't a software help request, although if you know the answer I would love you to death (not with a rusty spoon though.
We use Borland to compile one of our slot OSs at work. This morning my project compiled. Then I made the mistake of adding a BOOL variable to my class (keep in mind that there were already other BOOLs declared in that same class) and it stopped working. The linker would hang in an infinite loop. After a little investigation it turns out that it was one function that was the culprit. If I used the variable in that function, the linker hung. If I used it anywhere else, it was fine.
Since I can't actually post the code without being fired
class blah
{
public:
func1();
func2();
...
funcCrashTheSh!ttyLinker();
...
private:
BOOL var1;
BOOL varCrashTheSh!ttyLinker;
};
blah::func1()
{
if (var1) {...}
if(varCrashTheSh!ttyLinker) {...}
}
...
blah::funcCrashTheSh!ttyLinker()
{
if (var1) {...}
if(varCrashTheSh!ttyLinker) {...} //remove this line to not hang the linker
}
There is absolutely no reason for it to work like this. I tried renaming the variable. I changed it's type. I made it global to the file outside my class. Nothing worked.
The workaround? To use a set/get function on the variable so I'm not directly accessing it in the function.
:|:|:|:|
The only deduction I can come to is that the compiler was written by an insane monkey. I'd really hate to have to murder that monkey with a rusty spoon, but if I ever met him on the street I would be forced to.
