I’m trying to learn how to bind C++ code to the Lua API.
What I’ve managed so far is registering simple functions and components, but so far I had never registered a function that received a Vector parameter.
It appears that Urho uses some binding code in <Urho3D/LuaScript/ToLuaUtils.h>, the relevant functions for me right now are ToluaIsVector and ToluaToVector. So I #included the file (with the Urho full path, like I just wrote) in my pkg file.
The binding code is generated with the proper include and the code correctly sees the functions and compiles. But it’s failing to link. One of the errors is:
The other errors are very similar.
I’m correctly linking to Urho3D as a library so why are those symbols not included? Maybe that file doesn’t get built in the library version?
EDIT: I’m pretty sure it’s not that as I just looked through libUrho3D.a (with grep) and ToluaIsVector is in there.
Would it be better to just maintain a copy of ToLuaUtils in my Source folder and just build it as if it was part of my game?
Also, I was wondering, why are relative include paths being used inside Urho files? I’m talking for exaple about this file, ToLuaUtils.h:
Thanks!