Explanation: together with the bare SCons build system, on this branch I added some dummy codefiles, to validate the build system is working as merged in from master
42 lines
890 B
C++
42 lines
890 B
C++
/*
|
|
dummy-func.cpp - placeholder with dummy functions to demonstrate building shared modules
|
|
|
|
* ******************************************************************************************/
|
|
|
|
|
|
#include "common/dummy-func.hpp"
|
|
|
|
#include <dlfcn.h>
|
|
#include <nobug.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace lumiera {
|
|
|
|
const char * const GUI_MODULE_NAME = ".libs/gtk_gui.lum";
|
|
|
|
typedef void (*VoidFunc)(void);
|
|
|
|
|
|
void
|
|
loadDummyGui()
|
|
{
|
|
void* handle = dlopen (GUI_MODULE_NAME, RTLD_LAZY|RTLD_LOCAL);
|
|
if (handle)
|
|
{
|
|
VoidFunc entryPoint = (VoidFunc) dlsym (handle, "start_dummy_gui");
|
|
|
|
if (!entryPoint)
|
|
ERROR (lumiera, "unable to resolve the entry point symbol after loading the GUI module.");
|
|
|
|
else
|
|
(*entryPoint) ();
|
|
}
|
|
else
|
|
ERROR (lumiera, "unable to load %s", GUI_MODULE_NAME);
|
|
}
|
|
|
|
|
|
} // namespace lumiera
|