0

Currently I am attempting to create an game editor and I'm currently trying to implement scripting which :

  1. Creates a class which inherits a base class
  2. Creates a header and CPP file of said class and include it into the project

I have completely no idea as to how I should go about implementing this. What should I be using to implement this?

Kazuki_ZK
  • 11
  • 3
  • 1
    Unfortunately, C++ does not work this way. Only a C++ compiler can convert C++ source code into an executable form. There is no C++ compiler that's included in the C++ library itself. Your game editor needs to install an entire C++ compiler, as part of the game editor itself, then figure out how to invoke it, compile down the C++ source into a binary or a library, and if successful, dynamically load the library or run the executable, separately. Something along these lines requires advanced, expert knowledge of C++, at least 5-7 years of experience, I'd say. How much experience do you have? – Sam Varshavchik Dec 22 '21 at 02:46
  • A missing step in your process is a compilation step. Adding files to a project makes no difference to the executable until the project is re-compiled. So your game editor is for creating a completely new game (that needs to be compiled by the user), not merely creating scenarios for an existing game (that would have been compiled by you in advance)? – JaMiT Dec 22 '21 at 03:06
  • Have you seen this [question](https://stackoverflow.com/questions/115703/storing-c-template-function-definitions-in-a-cpp-file)? The answer in the link might help you. – Yujian Yao - MSFT Dec 23 '21 at 01:16

0 Answers0