How do I interface with extern variables from Cheerp/js?
问题 Cheerp is a C++ to js/wasm transpiler. Screeps is a programming videogame. How do I read in the Game.time variable from my transpiled C++ code? (in screeps) #include <cheerp/client.h> #include <iostream> using namespace std; namespace client { class Game : public Object { public: static volatile double time; }; extern volatile Game &Game; } void webMain() { cout << __TIME__ << ": The current time is: " << client::Game.time << endl; } I have tried any number of variations on: extern , volatile