Properly link flecs library
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "dll_app",
|
||||
"type": "application",
|
||||
"value": {
|
||||
"use": [
|
||||
"flecs", "dll_module"
|
||||
],
|
||||
"language": "c++"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#include <dll_app.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
flecs::world world(argc, argv);
|
||||
|
||||
world.import<movement::module>();
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "dll_module",
|
||||
"type": "package",
|
||||
"value": {
|
||||
"use": [
|
||||
"flecs"
|
||||
],
|
||||
"language": "c++"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#include <dll_module.h>
|
||||
|
||||
namespace movement
|
||||
{
|
||||
module::module(flecs::world& ecs) {
|
||||
ecs.module<module>();
|
||||
|
||||
ecs.component<Position>();
|
||||
ecs.component<Velocity>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user