Properly link flecs library

This commit is contained in:
2023-11-09 11:38:29 +01:00
parent dc585396c3
commit 8edcf9305c
1392 changed files with 390081 additions and 164 deletions

View File

@@ -0,0 +1,16 @@
#ifndef DLL_APP_H
#define DLL_APP_H
/* This generated file contains includes for project dependencies */
#include "dll_app/bake_config.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,25 @@
/*
)
(.)
.|.
| |
_.--| |--._
.-'; ;`-'& ; `&.
\ & ; & &_/
|"""---...---"""|
\ | | | | | | | /
`---.|.|.|.---'
* This file is generated by bake.lang.c for your convenience. Headers of
* dependencies will automatically show up in this file. Include bake_config.h
* in your main project file. Do not edit! */
#ifndef DLL_APP_BAKE_CONFIG_H
#define DLL_APP_BAKE_CONFIG_H
/* Headers of public dependencies */
#include <flecs.h>
#include <dll_module.h>
#endif

View File

@@ -0,0 +1,10 @@
{
"id": "dll_app",
"type": "application",
"value": {
"use": [
"flecs", "dll_module"
],
"language": "c++"
}
}

View File

@@ -0,0 +1,7 @@
#include <dll_app.h>
int main(int argc, char *argv[]) {
flecs::world world(argc, argv);
world.import<movement::module>();
}

View File

@@ -0,0 +1,33 @@
#ifndef DLL_MODULE_H
#define DLL_MODULE_H
/* This generated file contains includes for project dependencies */
#include "dll_module/bake_config.h"
#ifdef __cplusplus
extern "C" {
#endif
namespace movement
{
struct Position {
float x;
float y;
};
struct Velocity {
float x;
float y;
};
struct DLL_MODULE_API module {
module(flecs::world& world);
};
}
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,39 @@
/*
)
(.)
.|.
| |
_.--| |--._
.-'; ;`-'& ; `&.
\ & ; & &_/
|"""---...---"""|
\ | | | | | | | /
`---.|.|.|.---'
* This file is generated by bake.lang.c for your convenience. Headers of
* dependencies will automatically show up in this file. Include bake_config.h
* in your main project file. Do not edit! */
#ifndef DLL_MODULE_BAKE_CONFIG_H
#define DLL_MODULE_BAKE_CONFIG_H
/* Headers of public dependencies */
#include <flecs.h>
/* Convenience macro for exporting symbols */
#ifndef dll_module_STATIC
#if defined(dll_module_EXPORTS) && (defined(_MSC_VER) || defined(__MINGW32__))
#define DLL_MODULE_API __declspec(dllexport)
#elif defined(dll_module_EXPORTS)
#define DLL_MODULE_API __attribute__((__visibility__("default")))
#elif defined(_MSC_VER)
#define DLL_MODULE_API __declspec(dllimport)
#else
#define DLL_MODULE_API
#endif
#else
#define DLL_MODULE_API
#endif
#endif

View File

@@ -0,0 +1,10 @@
{
"id": "dll_module",
"type": "package",
"value": {
"use": [
"flecs"
],
"language": "c++"
}
}

View File

@@ -0,0 +1,11 @@
#include <dll_module.h>
namespace movement
{
module::module(flecs::world& ecs) {
ecs.module<module>();
ecs.component<Position>();
ecs.component<Velocity>();
}
}