In a word - don't do it! Following my green block code, I wanted to render the grid and I figured I could do this in about ten minutes - ha! I put a couple of simple classes including a grid class in a library as this will be used by the server as well. The code compiled but would not link; I got the dreaded unresolved external.
I've had these before many times and I can usually fix them fairly quickly. Its usually a project setting in my case. I checked and rechecked all the project settings, I compared this project against Morde which used a similar setup but all to no avail. I wont bore you with the diagnostics. Suffice to say I eventually traced the problem down to the use of inline functions in the library.
I'm not entirely sure why you cant use inlines, and I'll read up on that to find out but the silly thing is that I never use inlines. I even read an article by Scott Meyers recently about why its generally a bad idea to use them so what on earth posessed me to start today? Well lesson learned I guess!
The grid doesn't render properly but I can fix that another day.
As a side note... usually I would have left this problem to another day. I was actually in the middle of watching a movie when it cropped up and I thought I could literally write this bit of code in 10 minutes. Usually if I hit a problem late in the evening I leave it and come back to it after some sleep but today something nagged me and I told myself that I simply had to fix it now otherwise it would hang over me. Sometimes you have to know when to call it a day. Other times you have to know when to just plough through a problem until it is resolved.
Sunday, February 11, 2007
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment