Problems with VS 2010

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

    • Problems with VS 2010

      Hi,

      I bought the book and now I would like to work with the code. I downloaded the test branch via SVN and the 3rdParty-2010.zip as well. I unzipped the latter into the Source folder of the gamecode3 tree.

      What exactly do I have to do to build the GameCode3_2010 solution with VS 2010, which is configured to work with the DirectX-SDK (June 2010)?

      The problems start with the message that the Lang project is unavailable and continue with:
      Error 1 error LNK1181: cannot open input file 'zlib.lib' for the projects Editior_2010, EditorApp_2010, and TeapotWars.

      Regards, RSel

      The post was edited 3 times, last by chessweb ().

    • Sounds like it can't find the 3rd party libs. Did you add the path to those libs to your search directories?

      -Rez
    • I might make sense to just package up the latest stuff and provide it as one giant zip file. If you want the latest, grab it from SVN. If you just want the last stable, here's a zip. What do you guys think?

      -Rez
    • bad habit's hint did the trick. I got the Lang project loaded and it builds OK.

      After moving around some of the dlls I even got the EditorApp and Teapotwars running, but they are not stable.

      Teapotwars just crashes after some time and EditorApp won't start up completely because of some strange memory issue. At least that is what the message box tells me that pops up, and pops up again and again all the time as soon as it closed. Due to this the EditorApp can only be terminated by the task manager.
    • Btw - I finally got 2010 on a separate, clean, computer and can work on all these crazy problems. As always, if someone has a fix now, and just wants access to check it in, let me know and I'll give you access to the Google Code repository.
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • If I remember, been away for month, the changes that I made to get things to work were:

      Add DEBUG to the preprocessor definitions to gcc3 lib so that the correct language dll gets loaded.


      Needed to add the calling conventions to the appropriate declarations in NativeMethods.cs, like:

      [DllImport(editorDllName, CallingConvention = CallingConvention.Cdecl)]
      public static extern void RenderFrame();
      [DllImport(editorDllName, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
      public static extern void CreateActor(int type, UInt32 color, float length, float radius, string lEffectFileName, string lMeshFileName);
      [DllImport(editorDllName, CallingConvention = CallingConvention.Cdecl, CharSet=CharSet.Ansi)]
      public static extern void SaveLevel(string lFileName);

      else the editor would just crash on its first call into the native dll.


      Added g_pApp->OnClose() to the top of DXShutdown() in EditorGlobalFunctions.cpp to stop the editor crashing on shutdown.


      Changed some of the Editor project settings:

      Build->Output->Output Path -- to -- ..\..\Test\ and ..\..\Bin\
      Debug->Start Options->Working Directory -- to -- ..\Test\ and ..\Bin\


      That was about it I think.


      Actually got it to work on 64-bit as well, but I had to supply some empty functions for checking the CPU speed since x64 won't allow asm builds, I'll need to look into the intrinsic methods that replace the asm calls.