Adds a hello message from the plugin
Adds a simple console output message to confirm the plugin is correctly loaded and initialized. This serves as a basic smoke test and helps with debugging.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#ifndef LUMENITE_API_H
|
||||
#define LUMENITE_API_H
|
||||
|
||||
#include <iostream>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include "lua.h"
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#include <iostream>
|
||||
#include <bits/ostream.tcc>
|
||||
|
||||
#include "lumenite_api.h"
|
||||
|
||||
|
||||
@@ -5,8 +8,8 @@
|
||||
// ─────────────────────────────────────────────────────────────────────────────
|
||||
//! Plugin Metadata Declaration
|
||||
// This macro registers the plugin with Lumenite and defines its:
|
||||
// - Plugin name → from PLUGIN_NAME (defined in CMakeLists.txt)
|
||||
// - Plugin version → from PLUGIN_VERSION (defined in CMakeLists.txt)
|
||||
// - Plugin name -> from PLUGIN_NAME (defined in CMakeLists.txt)
|
||||
// - Plugin version -> from PLUGIN_VERSION (defined in CMakeLists.txt)
|
||||
//
|
||||
// To change the plugin name or version, edit the following lines in CMakeLists.txt:
|
||||
//
|
||||
@@ -43,6 +46,7 @@ static int lua_add(lua_State *L)
|
||||
//
|
||||
extern "C" int luaopen_plugin(lua_State *L)
|
||||
{
|
||||
std::cout << "Hello from C++ plugin!" << std::endl;
|
||||
lua_newtable(L);
|
||||
|
||||
// plugin.message = "Hello from Lumenite C++ plugin!"
|
||||
|
||||
Reference in New Issue
Block a user