File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// Copyright (c) 2020 by Chrono
22//
3- // g++ luajit.cpp -std=c++11 -o a.out;./a.out
4- // g++ luajit.cpp -std=c++14 -o a.out;./a.out
5- // g++ luajit.cpp -std=c++14 -I../common -o a.out;./a.out
3+ // g++ luajit.cpp -std=c++11 -I/usr/local/include/luajit-2.1 -lluajit-5.1 -ldl -o a.out;./a.out
4+ //
5+ // g++ luajit.cpp -std=c++11 -I/usr/local/include/luajit-2.1 /usr/local/lib/libluajit-5.1.a -ldl -o a.out;./a.out
6+ // g++ luajit.cpp -std=c++11 -I/usr/local/include/luajit-2.1 -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lluajit-5.1 -ldl -o a.out;./a.out
7+ //
68
9+ #include < cassert>
710#include < iostream>
811
9- #include < luajit-2.1/luajit.h>
12+ extern " C" {
13+ #include < luajit.h>
14+ #include < lualib.h>
15+ #include < lauxlib.h>
16+ }
17+
18+ void case1 ()
19+ {
20+ auto L = luaL_newstate ();
21+ assert (L);
22+
23+ luaL_openlibs (L);
24+
25+ lua_close (L);
26+ }
1027
1128int main ()
1229{
You can’t perform that action at this time.
0 commit comments