LuaPlus Linker Problems

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

    • LuaPlus Linker Problems

      So I'm working on implementing scripting in my game, but every time I try to build it gives me linker errors with LuaPlus.

      Source Code

      1. error LNK2019: unresolved external symbol "public: class LuaPlus::LuaObject __thiscall LuaPlus::LuaObject::GetByIndex(int)const " (?GetByIndex@LuaObject@LuaPlus@@QBE?AV12@H@Z) referenced in function "public: virtual void __thiscall IScene::VOnAttach(void)" (?VOnAttach@IScene@@UAEXXZ)
      2. error LNK2019: unresolved external symbol "public: unsigned int __thiscall LuaPlus::LuaObject::GetCount(void)const " (?GetCount@LuaObject@LuaPlus@@QBEIXZ) referenced in function "public: virtual void __thiscall IScene::VOnAttach(void)" (?VOnAttach@IScene@@UAEXXZ)
      3. error LNK2019: unresolved external symbol "public: class LuaPlus::LuaObject __thiscall LuaPlus::LuaObject::operator[](char const *)const " (??ALuaObject@LuaPlus@@QBE?AV01@PBD@Z) referenced in function "public: virtual void __thiscall IScene::VOnAttach(void)" (?VOnAttach@IScene@@UAEXXZ)


      I linked in the luaplus_1100.lib file, and all of the other lua calls that I've used so far (luastateowner and such) work fine. I've tried using the ones from the third party files from the book, as well as directly from luaplus.org, and both gave the same issue.

      Could I be doing something wrong, or perhaps the libraries aren't up to date? If so, I could use some tips on building the source form their website, because I've tried and can't figure it out.
    • RE: LuaPlus Linker Problems

      It looks like it can't find the methods in the lib, I would double check that the lib paths are correct.

      If you want to build the lua stuff yourself then you'll need to download JamPlus so that you can create the vs project files from the lua bat files.
    • RE: LuaPlus Linker Problems

      Yeah, I missed out on the download jamplus part, that would probably be important. I'll see if I can get the library rebuilt and see if that helps at all. Thanks.

      [Edit]
      Yeah, I have no clue how to build this (if you couldn't tell already I'm fairly new at this).
      1.Run the CreateJamVS2010Workspace.bat (or CreateJamVS2008Workspace.bat or CreateJamXcodeWorkspace.sh) script in the LuaPlus main directory after putting the jamplus\bin\win32 directory in your PATH (or modifying the CreateJamVS2010Workspace.bat script to point to that directory).
      2.Navigate to build2010\_workspace.vs2010_\ and open LuaPlus.sln within Visual Studio 2010.
      3.Build the solution.

      What is this "PATH"? I can't seem to find anything on it online, and I'm basically clueless at this point. Any direction on this would be greatly appreciated.

      The post was edited 1 time, last by Nethara ().

    • PATH is a system variable that corresponds to a bunch of places that will get checked. One common place it's used is the command line. When you type "ping" it checks for "ping", "ping.exe", "ping.bat" etc. at all the locations listed in PATH.

      More information on path here.

      On Windows, to access path (Vista/7), right click on Computer, go to Properties, click Advanced system settings, click the Advanced tab, then click Environment Variables... . Under System variables you will find the "Path" variable.

      My personal bias is don't start muddying up Path just to make compiling easier when you can just set your project settings appropriately. In this case, your bat file is trying to refer to an exe by just its name, so it is relying on you to have added the folder that it resides in to your Path variable.

      Hope that helps.
    • So that kind of helped. Now when I run the .bat file it seems to be trying to do something, then just crashes.

      Problem signature:
      Problem Event Name: APPCRASH
      Application Name: jam.exe
      Application Version: 0.0.0.0
      Application Timestamp: 4de6d94f
      Fault Module Name: StackHash_414a
      Fault Module Version: 6.1.7600.16695
      Fault Module Timestamp: 4cc7ab86
      Exception Code: c0000374
      Exception Offset: 000cea27
      OS Version: 6.1.7600.2.0.0.768.3
      Locale ID: 1033
      Additional Information 1: 414a
      Additional Information 2: 414a1c8c9bc4d4fa7dedaa5a8f7d9d45
      Additional Information 3: a97d
      Additional Information 4: a97d09ca3f650973856a946dc1cffbfc

      Read our privacy statement online:
      go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

      If the online privacy statement is not available, please read our privacy statement offline:
      C:\Windows\system32\en-US\erofflps.txt

      The internet hasn't been too forthcoming about this issue either. Any help that could be provided would be greatly appreciated. :D
    • So I tried that, and now it stopped giving me errors - it just doesn't do anything anymore. Whether I run it from the windows command prompt, the VS command prompt, or straight from the .bat file, it just waits for about 1/4 of a second and stops. No directories were created or anything, so I have no clue what's happening.

      The post was edited 1 time, last by Nethara ().