We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
version 3.1.57-git
main.cpp
#include <string> using namespace emscripten; class Database { public: Database(std::string databasePath): databasePath{databasePath}{ printf("Database init \n"); } std::string databasePath; }; class Connection { public: Connection(Database* database) { printf("Connection init\n"); this->database = database; } Database* database; }; EMSCRIPTEN_BINDINGS(my_module) { class_<Database>("Database") .constructor<std::string>() .property("databasePath", &Database::databasePath); class_<Connection>("Connection") .constructor<Database*>() .property("database", &Connection::database); }
Build command: emcc main.cpp -o main.js --bind
emcc main.cpp -o main.js --bind
Error information:
emcc main.cpp -o main.js --bind main.cpp:30:9: error: expected expression 30 | .property("database", &Connection::database); | ^ 1 error generated.
It can run well without .property("database", &Connection::database); But don't know how to bind the pointer property.
.property("database", &Connection::database);
The text was updated successfully, but these errors were encountered:
brendandahl
No branches or pull requests
version
3.1.57-git
main.cpp
Build command:
emcc main.cpp -o main.js --bind
Error information:
It can run well without
.property("database", &Connection::database);
But don't know how to bind the pointer property.
The text was updated successfully, but these errors were encountered: