Problems compiling with Lua

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

    • Problems compiling with Lua

      Downloaded the source from the publisher Web site and did the following setup:

      1) Converted all 6 projects to 2010

      2) Unzipped 3rdParty folder to GameCode3\Source directory, this includes:
      -boost_1_45_0
      -bullet-2.73
      -LuaPlus
      -oggvorbis-win32sdk-1.0

      3) Changed "Additional Include Directories" for GameCode3 projects to boost_1_45_0 from boost_1_37_0

      4) Created a new Property Sheet for the June2010 DirectX libraries and includes and attached the property sheet to all needed projects

      5) Switched <dxerr9.h> to <dxerr.h> inside dxstdafx.h - From this point, no DirectX issues, that's all fine.

      Now comes the trouble, in LuaStateManager I commented out "#include "LuaPlus/LuaLink.h"" and the 2 other similar Lua includes because it was giving me a compile error (as were all Lua references in the file). I added "#include <LuaPlus\LuaLink.h>" as well as 2 more, which VS2010 likes, it's able to find those files via code insight immediately. But, the code still does not compile. All uses of these classes (like LuaObject) are flagged as unknown in the actual code.

      Similar problems look to be on the horizon for using boost.

      So, what do I do from here? It seems a number of other people have had this issue but I don't see any of those having posted how it was successfully resolved.

      Note that I have not added the LuaPlus VS project to my current solution, nor have I added the source code directly to any of the 6 provided GCC projects. I have left in the reference provided in the project I downloaded, which is in the project properties for GameCode3 under "Additional Include Directories", where it cites:

      $(SolutionDir)
      $(SolutionDir)DX10
      $(SolutionDir)3rdParty\OggVorbis-win32sdk-1.0\include
      $(SolutionDir)3rdParty\boost_1_45_0
      $(SolutionDir)3rdParty\LuaPlus\Src

      I thought this last line (which I have not changed) would do the trick, and again, code insight finds the files I'm trying to include, but no luck within the source code.

      Any help would be appreciated,

      McKillaGorilla
      Richard McKenna
      Lecturer
      Computer Science Department
      Stony Brook University
    • I'm assuming you're not getting the "can't find include file" errors, right? Is it a namespacing issue? LuaPlus uses the LuaPlus namespace and I know there's been some difficulty there.

      -Rez
    • Yup, that was it

      Yup, you're right, I had just figured that out. Just figured out another one too. It seems LuaPlus has a little error in it. LuaPlus.cpp needed:

      using LuaPlus::LuaState_UserStateFree_Internal;
      using LuaPlus::LuaState_UserStateOpen_Internal;
      using LuaPlus::LuaState_UserStateThread_Internal;

      This lets me compile Lua. Now on to boost.
      Richard McKenna
      Lecturer
      Computer Science Department
      Stony Brook University