Share via


The code!!! It doesn't compile!!!

So I was looking at my latest book on Amazon and noticed it had a review.. Only 1 star.. Apparently 'Phoenix Guy' can't get the code to compile, and really there's nothing else to say.. (Although, if you read this 'Phoenix Guy', please stop using all caps..)

Now, I had a 1 star review on my last book too, so I'm not overly worried about that.  What I *am* worried about is the code not compiling for this guy..  Naturally, when I tried it, everything compiled (and worked) just fine for me.  Has anyone else who has my second book had an issue with it not compiling?  If so, where?  Unfortunately this guys 'review' doesn't give me any type of information I could use to try to 'fix' the issues (if they exist)..

Comments

  • Anonymous
    February 21, 2005
    The comment has been removed
  • Anonymous
    February 21, 2005
    Too funny, "Phoenix Guy" has done several reviews, all are either one star or five stars. Never took caps lock off in any of them. Idiot.
  • Anonymous
    February 21, 2005
    Maybe he didn't have dxsdk installed?! Hehehe could be :D
  • Anonymous
    February 21, 2005
    mmh, well, i am kind of new on this MDX stuff, but what happened to me was that the code from the first book didn't compile with the newer SDKs, Summer 2003 SDK worked fine, but with December 2004 SDK I had to make some minor changes. Now I don't know if the examples from the second book don't compile with older MDX SDKs (Summer 2003). What I am trying to say, is that everything worked like a charm.
  • Anonymous
    February 21, 2005
    I noticed errors as well with the december update, but anybody using the VS IDE and a little C# knowledge would pick up the changes that need to be made.
  • Anonymous
    February 21, 2005
    The comment has been removed
  • Anonymous
    February 22, 2005
    ISB, it's a bit more complicated. The book says it ships with the Summer SDK release, but the cd has the October release.

    I was using the December release and it only failed on me when I got to the Frame.LoadHierarchyFromMesh (or whatever that method is, I'm not at home right now).

    I had to back up to the October release.

    Tom, what changed with this method? Is it a bug or a usage thing? I'm not worried if it's a bug, these things happen, but if the usage of this method is changing, that's something I would like to be aware of.
  • Anonymous
    February 22, 2005
    Just ordered the book on amazon a few days ago, so i hope you are right :)

    Anway, what I read in a review somewhere (sorry dont remember where, but i think it might be gamedev.net) is that some of the code has issues after one of the newer releases... guess December 2004 would be it as ISB wrote above. That seems likely, as the tutorials following that release had simmilar issues, the "Lights" tutorial amont others wouldnt compile.

    Anyway, looking forward to reading the book and get my hands dirty.
    - Kasper
  • Anonymous
    February 22, 2005
    I have the book, and it all compiles with out a problem. I have even started using the frame work for the second project in the book as a base for a project I am working on... The one thing that I did find though is that there are some diagrams that are missing, and in there place are the previous diagrams.
  • Anonymous
    February 22, 2005
    I have both books and with Feb 2005 SDK installed. No problems with the second book's codes. The codes in the first book need to modify a little to work with new SDK, it's not hard to figure it out except the codes relate to the part of AllocateHierarchy derived class from chapter13.
  • Anonymous
    February 22, 2005
    The comment has been removed
  • Anonymous
    February 23, 2005
    I have the book as well as Tom's previous one and have posted reviews for both of them. I've never had any trouble with the new book's code, but the previous one had a few issues b/c of changes made in DX9 after it was published. The majority of the changes were as easy as commenting out Lights.Commit() though, so it was not a big issue.
  • Anonymous
    February 24, 2005
    Just wanted to say keep writing. Your books are the best MDX books out there (out of the few that exist), and the more we have, the better.
  • Anonymous
    February 24, 2005
    Waiting for this book from Amazon for 4 weeks now !!! I am in Australia, I guess its like on another planet or something :)
  • Anonymous
    February 27, 2005
    The comment has been removed
  • Anonymous
    February 28, 2005
    Well, when I started reading the book I thought that the CD would contain the code in C# as well as in VB.NET. On page 7 it even says: "The text of the book will cover the C# code, but the accompanying CD will include the code in each language". However, the CD that came with my book only contains C# code. I don´t own Visual C# so this was kind of a problem to me. Anyway, I managed to compile the sample framework into a DLL using sharpdevelop that I can use in my projects. Currently I am working on the GUI part and have not had any problems translating the code in the book into VB.NET, however, I am dissapointed since the CD should contain VB code too...
  • Anonymous
    February 28, 2005
    yeah the teapot example was the first snag I hit but if you read some of the dx documentation and install the managed dx tutorials that come with it you can figure it out.
  • Anonymous
    March 02, 2005
    Hi Tom, I've had some problems as well. All pretty minor. The only major one I've run into is the CD doesn't seem to have the ".x" files (such as road.x) for the sample game. Is there somewhere I can go get them?

    GregTilford@email.com
  • Anonymous
    March 08, 2005
    The comment has been removed
  • Anonymous
    March 09, 2005
    I haven't had any problems compiling the code. But when I run (for example) the Go Kart racing example in release mode, The background sprite (or possibly the texture) doesn't render. In debug mode, it works fine. I tried this with October release and now have December and still no luck. I thought it was perhaps the GC collecting something early (this can be why debug and release are different), but I display the IsDesposed (or whatever it is) property of the sprite and texture and they both say false. I am trying to use this framework for a game of mine but if I can't get a background to display, I'm hosed. Anyone?

    By the way Tom, best books out there. Have them both and love them.
  • Anonymous
    March 10, 2005
    The comment has been removed
  • Anonymous
    March 10, 2005
    It is unfortunate that this book doesn’t have the source code on the CD that you are supposed to type in. For a newbie, it really stinks to have to put up with stuff that doesn’t compile. And the book doesn’t have all the code in one place, it is spread out over many pages. And where is the errata? This is needed. Otherwise a lot of people are going to waste a lot of time, and some will burn out, and of course the blame for that will be at the author’s or publisher’s feet. Without all the source code on the CD, if you seem to be missing something you can try to figure out what it is, or try to read and read and see if it is in a sentence you missed.

    I am still trying to figure out where the code for the definition of blockersEngine is. Does anyone know?
  • Anonymous
    March 10, 2005
    I was having a couple of problems with Chapter 4. The "Render Method" it refers to on page 59-60 actually means the "OnFrameRender method". I found blockersEngine definition by searching through the Sams Publishing folder in the Program Files folder for the text "blockersEngine". This didn't work for me yesterday and today. But then I did a test, and searched for the very common word for a .cs file, "void", and it also returned nothing. Then I searched the internet and found this:

    http://support.microsoft.com/default.aspx?scid=KB;EN-US;309173

    and used regedit to fix XP so I could search .cs files

    It turns out that in the Blockers folder in the above Sams Publishing directory is a file gameEngine.cs which is what I have needed all along to fill in what I could not get easily from the text.

    Back on track.
  • Anonymous
    March 13, 2005
    Tom,

    Just to update you as i've played around with the book's source code some more and have run into some errors but not until you start using Shaders in the later chapters. Apparently in the most recent DX SDK update, Effect.FromFile's method signature was changed and they added another string to what is required as input on all 3 variations of the method. All you have to do is put "null" for that new string and it works fine. The new string is located directly before the ShaderFlags parameter. Perhaps this is what the guy was having trouble with?
  • Anonymous
    March 13, 2005
    General comment, not specific to Tom's new book which I just got but haven't seriously started to work through. I've had problems with redefinition of the Effects method (noted elsewhere) and (this is new to me) a difference in the arguments between December and February 2005 for Effect.FromStream () which caused old code which worked to generate a compile error. Shouldn't method overloading allow new features to be added without breaking old code?
  • Anonymous
    March 14, 2005
    The comment has been removed
  • Anonymous
    March 15, 2005
    The comment has been removed
  • Anonymous
    March 20, 2005
    Book website on SAMS needs an errata, such as the correct Figure 2.1 on page 27 (for which a second copy of Figure 1.5 was mistakenly substituted).

    Hope this isn't a bad omen. I'm only on page 28!
  • Anonymous
    April 29, 2008
    PingBack from http://ezinefrontpageblog.info/tom-millers-blog-the-code-it-doesnt-compile/