chaiscript

Binding functions with multiple arguments results in C2027

对着背影说爱祢 提交于 2019-12-11 22:43:18
问题 I'm using ChaiScript 5.3.1, and I'm trying to bind functions to my own class, specifically a setPosition function which can take either a Vector3 or 3 floats. The class and it's relevant methods are declared like so: class DLLExport Actor { public: Actor(Level* level, const String& name, Actor* parent); virtual ~Actor(); void setPosition(const Real& x, const Real& y, const Real& z); void setPosition(const Vector3& position); }; and I'm trying to bind them like this: m->add(user_type<Actor>(),

Clang Linking with SO

房东的猫 提交于 2019-12-03 06:17:34
I keep getting ld: library not found for -lchaiscript_stdlib-5.3.1.so clang: error: linker command failed with exit code 1 (use -v to see invocation) When trying to link to a .so The command I'm using is. clang++ Main.cpp -o foo -L./ -lchaiscript_stdlib-5.3.1.so What am I doing wrong? libchaiscript_stdlib-5.3.1.so is in the same directory as Main.cpp I thought the -L./ would add the .so to the library seach paths. Yes the -L option adds the search path, but the linker adds the .so (or .a ) suffix itself (just like it adds the lib prefix). So you only need to have -lchaiscript_stdlib-5.3.1 and