Вопрос Connecting luajit, ffi?

Начинающий
Статус
Оффлайн
Регистрация
27 Май 2022
Сообщения
18
Реакции[?]
0
Поинты[?]
0
Does anyone know anything about connecting luajit to c++ dll program to get ffi working?

Currently i have working lua api and i can load luas but whenever i try to load luas which includes ffi im getting these errors:

local ffi attempt to index a boolean value
module 'ffi' not found: no field package.preload['ffi']

This is my lua initialization:
Код:
lua = sol::state(sol::c_call<decltype(&lua_panic), &lua_panic>); 
lua.open_libraries (sol::lib::base, sol::lib::ffi, sol::lib::jit, sol::lib::string, sol::lib::math, sol::lib:: table, sol::lib::debug, sol::lib: :package);
I already have included luajit.lib but still its not working. Getting the errors mentioned above.

If someone could help i apperciate help & answers.
 
Олдфаг
Статус
Оффлайн
Регистрация
5 Июл 2017
Сообщения
2,108
Реакции[?]
1,189
Поинты[?]
0
If you use the original lua library.
The original lua and luajit are completely different scripting engines, you can't just add luajit.lib to your project, because the main lua library completely unrelated to luajit + there are no ffi/jit modules. Just delete the lua library and add everything from luajit, not just luajit.lib. I have no idea how did you implemented it, what did you added to the project, so I assume that you are using the original lua.

Luajit -
Пожалуйста, авторизуйтесь для просмотра ссылки.
 
Последнее редактирование:
Сверху Снизу