https://pastebin.pl/view/2bd658d4
Это нормально работает в Linux. Но вчера вечером я попытался установить Windows, чтобы проверить. И на последнем этапе я получаю чертову стену ошибок (связывание exe) https://paste.ofcode.org/GRQqhX8NHrCWShi43z4AaU (только одна часть, она в 5 раз длиннее этой)
Я попробовал несколько частей кода, попробовал использовать каждую функцию привязки по отдельности, и каждая из них работает, некоторые вместе тоже работают. Только когда я попытался вставить их все, произошел сбой, как указано выше
Код: Выделить всё
#include
#include
int main(int argc, char** argv)
{
beaver::sdlgame sdl {"test", 1280, 720};
sol::state lua;
beaver::ecs_core ecs; // contains several components
beaver::init_lua(lua);
beaver::bind_core(sdl, lua);
auto tbl = lua["pp"].get_or_create();
// beaver::bind_ecs_core_components(sss,game,f,lua); // this functions call every bind functions below
bind_entity(ecs, tbl);
bind_position(ecs, tbl, lua);
bind_velocity(ecs, tbl, lua);
bind_scale(ecs, tbl, lua);
bind_rotation(ecs, tbl, lua);
bind_pivot(ecs, tbl, lua);
bind_color(ecs,tbl,lua);
bind_oscillation(ecs, tbl, lua);
bind_flipflag(ecs, tbl, lua);
bind_tile_animation(ecs, tbl, lua);
bind_cbox(ecs,tbl,lua);
bind_state(ecs, tbl, lua);
bind_image_render(ecs, tbl, lua);
// bind_entity_render(ecs, sdl, tbl, lua); // Sample comment. This is enough to crash. I have to comment 2 more
// bind_timer(ecs, tbl, lua);
bind_stopwatch(ecs, tbl, lua);
bind_particle(ecs, tbl, lua);
lua.script_file("testt.lua");
beaver::run_game(sdl, [&](float dt){return true;},
[&]()
{
SDL_SetRenderDrawColor(sdl._graphics._rdr, 255,255,255,255);
SDL_RenderClear(sdl._graphics._rdr);
SDL_SetRenderDrawColor(sdl._graphics._rdr, 0,0,0,255);
sdl._graphics.line(10,10,500,500);
});
}
Для сборки я использую CMake, MinGW. Я передал gcc и g++ команде cmake.
Подробнее здесь: https://stackoverflow.com/questions/792 ... ith-sol2-c