Answer the question
In order to leave comments, you need to log in
C++. Including and linking compiled files into a running instance of the program?
Good day to all.
I must say right away that I have been familiar with C ++ for about 2 months.
I am developing a 2D game engine (on SFML + Box2D with JSON & ImGUI included). At the end of the development, the question arose of developing various projects (games) on one instance of the engine. The solution, of course, is straightforward - the core of the engine in the form of a dynamic library. The editor is an application based on this core.
And here the question arose of how to get the ability to use a compiled file (script, also C ++) in the editor's runtime? And is it right to think that if the kernel dynamic library is loaded in memory, then running a script that somehow links to the kernel (and to its certain knowledge base about scripts) will give the desired effect in the editor (which links to the same copy of the kernel in RAM)?
Answer the question
In order to leave comments, you need to log in
In C#, this is handled through reflection.
Maybe in c++ reflection will allow you to do this? Read about her.
Or use dynamic libraries.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question