git clone Catch and sol
copy Catch/single_include/catch.hpp to sol/Catch/include/catch.hpp
python bootstrap.py
ninja
rgb@woland:~/git/sol$ ninja
[1/3] Compiling tests.cpp to obj/tests.o
FAILED: g++ -MMD -MF obj/tests.o.d -c -Wall -Wextra -pedantic -pedantic-errors -std=c++11 -DNDEBUG -O3 -I"." -I"Catch/include" -Werror tests.cpp -o obj/tests.o
In file included from ./sol/reference.hpp:25:0,
from ./sol/object.hpp:25,
from ./sol/proxy.hpp:26,
from ./sol/table.hpp:25,
from ./sol/state.hpp:26,
from ./sol.hpp:25,
from tests.cpp:3:
./sol/types.hpp:25:19: fatal error: lua.hpp: No such file or directory
[1/3] Compiling tests.cpp to obj/tests.o
FAILED: g++ -MMD -MF obj/tests.o.d -c -Wall -Wextra -pedantic -pedantic-errors -std=c++11 -DNDEBUG -O3 -I"." -I"Catch/include" -I"/usr/include/lua5.1" -Werror tests.cpp -o obj/tests.o
In file included from ./sol/object.hpp:26:0,
from ./sol/proxy.hpp:26,
from ./sol/table.hpp:25,
from ./sol/state.hpp:26,
from ./sol.hpp:25,
from tests.cpp:3:
./sol/stack.hpp: In static member function ‘static U sol::stack::getter<T, X>::get(luaState, int)’:
./sol/stack.hpp:73:39: error: there are no arguments to ‘lua_tounsigned’ that depend on a template parameter, so a declaration of *‘luatounsigned’ must be available [-fpermissive]
return lua_tounsigned(L, index);^M
^
./sol/stack.hpp:73:39: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
In file included from ./sol/state.hpp:26:0,
from ./sol.hpp:25,
from tests.cpp:3:
./sol/table.hpp: In member function ‘size_t sol::table::size() const’:
./sol/table.hpp:108:38: error: ‘lua_rawlen’ was not declared in this scope
return lua_rawlen(state(), -1);^M
^
./sol/table.hpp: In member function ‘sol::table& sol::table::set_fx(std::true_type, T&&, TFx&&, TObj&&)’:
./sol/table.hpp:187:53: error: there are no arguments to ‘luaL_setfuncs’ that depend on a template parameter, so a declaration of ‘luaL_setfuncs’ must be available [-fpermissive]
luaL_setfuncs(state(), funcreg, upvalues + 1);^M
^
./sol/table.hpp: In member function ‘sol::table& sol::table::set_fx(std::false_type, T&&, TFx&&)’:
./sol/table.hpp:206:49: error: there are no arguments to ‘luaL_setfuncs’ that depend on a template parameter, so a declaration of ‘luaL_setfuncs’ must be available [-fpermissive]
luaL_setfuncs(state(), funcreg, upvalues);^M
^
./sol/table.hpp: In member function ‘sol::table& sol::table::set_fx(T&&, std::unique_ptrsol::base_function)’:
./sol/table.hpp:236:42: error: there are no arguments to ‘luaL_setfuncs’ that depend on a template parameter, so a declaration of ‘luaL_setfuncs’ must be available [-fpermissive]
luaL_setfuncs(state(), funcreg, 1);^M
Hello. I'm having problems building sol on Ubuntu
Platform: Ubuntu trusty
Software installed:
G++ Version
rgb@woland:~/git/sol$ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
Actions:
git clone Catch and sol copy Catch/single_include/catch.hpp to sol/Catch/include/catch.hpp python bootstrap.py ninja
rgb@woland:~/git/sol$ ninja [1/3] Compiling tests.cpp to obj/tests.o FAILED: g++ -MMD -MF obj/tests.o.d -c -Wall -Wextra -pedantic -pedantic-errors -std=c++11 -DNDEBUG -O3 -I"." -I"Catch/include" -Werror tests.cpp -o obj/tests.o In file included from ./sol/reference.hpp:25:0, from ./sol/object.hpp:25, from ./sol/proxy.hpp:26, from ./sol/table.hpp:25, from ./sol/state.hpp:26, from ./sol.hpp:25, from tests.cpp:3: ./sol/types.hpp:25:19: fatal error: lua.hpp: No such file or directory
include
compilation terminated. ninja: build stopped: subcommand failed.
Action: add /usr/include/lua5.1 to build.ninja
Output:
[1/3] Compiling tests.cpp to obj/tests.o FAILED: g++ -MMD -MF obj/tests.o.d -c -Wall -Wextra -pedantic -pedantic-errors -std=c++11 -DNDEBUG -O3 -I"." -I"Catch/include" -I"/usr/include/lua5.1" -Werror tests.cpp -o obj/tests.o In file included from ./sol/object.hpp:26:0, from ./sol/proxy.hpp:26, from ./sol/table.hpp:25, from ./sol/state.hpp:26, from ./sol.hpp:25, from tests.cpp:3: ./sol/stack.hpp: In static member function ‘static U sol::stack::getter<T, X>::get(luaState, int)’: ./sol/stack.hpp:73:39: error: there are no arguments to ‘lua_tounsigned’ that depend on a template parameter, so a declaration of *‘luatounsigned’ must be available [-fpermissive] return lua_tounsigned(L, index);^M ^ ./sol/stack.hpp:73:39: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) In file included from ./sol/state.hpp:26:0, from ./sol.hpp:25, from tests.cpp:3: ./sol/table.hpp: In member function ‘size_t sol::table::size() const’: ./sol/table.hpp:108:38: error: ‘lua_rawlen’ was not declared in this scope return lua_rawlen(state(), -1);^M ^ ./sol/table.hpp: In member function ‘sol::table& sol::table::set_fx(std::true_type, T&&, TFx&&, TObj&&)’: ./sol/table.hpp:187:53: error: there are no arguments to ‘luaL_setfuncs’ that depend on a template parameter, so a declaration of ‘luaL_setfuncs’ must be available [-fpermissive] luaL_setfuncs(state(), funcreg, upvalues + 1);^M ^ ./sol/table.hpp: In member function ‘sol::table& sol::table::set_fx(std::false_type, T&&, TFx&&)’: ./sol/table.hpp:206:49: error: there are no arguments to ‘luaL_setfuncs’ that depend on a template parameter, so a declaration of ‘luaL_setfuncs’ must be available [-fpermissive] luaL_setfuncs(state(), funcreg, upvalues);^M ^ ./sol/table.hpp: In member function ‘sol::table& sol::table::set_fx(T&&, std::unique_ptrsol::base_function)’: ./sol/table.hpp:236:42: error: there are no arguments to ‘luaL_setfuncs’ that depend on a template parameter, so a declaration of ‘luaL_setfuncs’ must be available [-fpermissive] luaL_setfuncs(state(), funcreg, 1);^M
I'd be grateful for your advice. ^