Thursday, March 11, 2010

SmartA$$ Microsoft Compiler adding an 'A' at the end of a method

I just spent 2+ hours trying to fix a 'linker' error reported by Microsoft's coveted Visual Studio 2008 C++ compiler/linker.

An application was linking to a clean library, with the suspect method properly implemented and exposed via the class's public interface. But the linker kept complaining that the method's symbol cannot be found in the library. Not even multiple clean/manual-clean/rebuilds helped.

As the frustration rose, I decided to finally use the dumpbin utility to actually dump the symbols exported by the suspect library. Funnily enough, the symbol I found had the letter 'A' appended to the end of it's name in the lib. Why?? I didn't declare the method with that name?

So I changed the name of the method, and then everything started working perfectly.

The real cause of the problem? Windows system headers already have a macro changing the name of that method based upon whether UNICODE is used or not, and so Microsoft's compiler was changing the name of the method I declared from 'AddJob' to 'AddJobA' before creating the symbols.

But wait: here's the best part: The linker would STILL complain it cannot find the symbols for the 'original' method name, 'AddJob'! So the compiler was smart enough to change the name of the symbol when creating it, but the linker is totally unaware of it.

HAH! So much for a smart software, Microsoft! Shame on you!!!

By the way here is another link I found on the web about the same issue later.

P.S. And of course the community section at Microsoft wont let me add any content to let others know and not repeat this mistake. Ughhhh!!!

Saturday, March 6, 2010

The movie Avatar and the critics



This is my response to the ongoing debate on PBS's FaceBook page about Avatar (2009), the latest movie by James Cameron:

"Guys, there's no point arguing over a subjective topic. There are people that like true to the core realistic movies. Then there are those who like a bit of fantasy touch to the screen. We are all different, with unique personas and tastes. It's ok to express one's preferences, but it's not ok to disrespect other's. Pen it down for your own beliefs, generalizing that to masses is being unwise and ignorant.

Let's not forget that this movie is the biggest grosser ever. If no-one liked it, would that still be true? And how many of you remember Final Fantasy the movie? It had spectacular CG, but a dead story. Why did that one not create waves?

But then again, for everything innovative, there are always doubting heads. They were there when talkies first came out, they were there when television was invented, they were there when movies grew into colors, and they are here, too. It's a part of evolution, so go ahead, criticize it all you want. That is what will birth great things - if not this one, the next one surely!:)"

Monday, March 1, 2010

Karaoke Performances

This post will be updated with any/all of songs with the main vocals removed and/or superimposed with my vocals.

Although this is a 'just for fun' project, I welcome any comments for improvements, collaboration, etc.

Thanks, and hope this will make and (not break) your day:-)