Coder Social home page Coder Social logo

Comments (3)

dougbinks avatar dougbinks commented on May 16, 2024

This isn't the intended way of using RCC++, which is designed for changing your own code at runtime. It is possible, but it's an advanced use case.

You need to use m_pRuntimeObjectSystem->AddToRuntimeFileList( filename, projectId );.

I think you will also need to set off the first compile after adding a file. I would use a different projectId (default is 0) to your main code so you can recompile only that code if needed and set options for that project separately.

Since the file doesn't exist to start with, RCC++ won't have a pre-compiled set of information about the libraries, includes etc. which this file uses. If the user writes their code by first adding the correct library and includes as per RCC++ before writing any code this should work, but you may want to make sure they always include a header which has the correct includes in it to work well.

One issue for using RCC++ this way is that the scripting system will always need to recompile the source code every run, though it you do not delete the temporary files this should be fairly fast.

I am considering adding improved support for scripting with RCC++ at some point, but currently do not have the time.

from runtimecompiledcplusplus.

vermaayu avatar vermaayu commented on May 16, 2024

Thanks for the suggestion. I'll try to implement that.
But before I do that, the problem at hand right now is the program is not able to find RCCppMainloop.cpp as given in step 3 of the tutorial. It keeps on returning ObjectFactorySystem::AddConstructors() called with no constructors in the console along with Found Directory Maps. I have the file, RCCppMainloop.cpp, in the directory.
RCCppInit()

bool dag::EditorUILayer::RCCppInit()
{
    g_SystemTable.pRuntimeObjectSystem = new RuntimeObjectSystem;
    g_SystemTable.pLogger = &g_Logger;
    if (!g_SystemTable.pRuntimeObjectSystem->Initialise(&g_Logger, &g_SystemTable))
    {
        delete g_SystemTable.pRuntimeObjectSystem;
        g_SystemTable.pRuntimeObjectSystem = NULL;
        return false;
    }

     g_SystemTable.pRuntimeObjectSystem->CleanObjectFiles();
#ifndef _WIN32
    g_SystemTable.pRuntimeObjectSystem->SetAdditionalCompileOptions("-std=c++11");
#endif

    return true;
}

I have the program compiling and running. What might be causing this?

from runtimecompiledcplusplus.

dougbinks avatar dougbinks commented on May 16, 2024

Have you first tried compiling the full example:
https://github.com/juliettef/RCCpp-DearImGui-GLFW-example

If this works then check for differences in logic or build (cmake) settings.

My initial thought is that you don't have RCCppMainloop.cpp in your CMakeLists.txt as per:
https://github.com/juliettef/RCCpp-DearImGui-GLFW-example/blob/main/CMakeLists.txt#L51-L52

from runtimecompiledcplusplus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.