TeapotWarsd error and and editor crash

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • TeapotWarsd error and and editor crash

      Greetings,

      I purchased this book (the 3rd edition) and was very happy that in the latest build that a lot of the previous problems i had with earlier versions were fixed, mainly the boost ones. I compiled the code and after a few quick changes like saying where the directx lib and include files were , i was ready to go. I compiled the code and had no errors and I went to test and ran TeapotWarsd and got the error "The application was unable to start (0xc0150002)". I looked at another thread and someone said they fixed this problem with setting the project( I assumed teapot wars) to release mode. I set it to release mode, i then added the bin folder as they said to the reference path, and then it said it could not find dxut10.lib. I put the path for that in preferences and then a whole lot of problems arose in visual studios. The errors all revolved around a comparison with the value 2 not matching 0 in teapotcontroller.obj. So far it does not run. I also saw that the editor will not run because of the 64 bit machine i am on.

      My question is how can I get teapotwarsd to run? I believe i set up everything correctly from the setup file , and besides release mode i do not get any compilation errors. I am using Visual Studios 2010 Professional from dreamspark, and i have directx installed. I am also using Windows 7 64 bit edition and have installed the visual c++ 2005 redistributable.

      Also is there any way to get the editor to run or will I need to virtual box a 32 version of windows 7 to run it because of the problem that I heard about?

      Thank you for your time
    • Here's a little snippet of code you can use to read the CPU speed on Windows platforms:

      Source Code

      1. DWORD ReadCPUSpeed()
      2. {
      3. DWORD BufSize = sizeof(DWORD);
      4. DWORD dwMHz = 0;
      5. DWORD type = REG_DWORD;
      6. HKEY hKey;
      7. // open the key where the proc speed is hidden:
      8. long lError = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
      9. L"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0",
      10. 0, KEY_READ, &hKey);
      11. if(lError == ERROR_SUCCESS)
      12. {
      13. // query the key:
      14. RegQueryValueEx(hKey, L"~MHz", NULL, &type, (LPBYTE) &dwMHz, &BufSize);
      15. }
      16. return dwMHz;
      17. }
      Display All
      Mr.Mike
      Author, Programmer, Brewer, Patriot