I am trying to expose this c++ function, it takes an argument of type
std::string
int loadURDF(const std::string &fileName, const struct
b3RobotSimulatorLoadUrdfFileArgs &args = b3RobotSimulatorLoadUrdfFileArgs
());
Here is what I have in my .idl file, on the last line you will see the
declaration.
interface b3RobotSimulatorLoadUrdfFileArgs {
void b3RobotSimulatorLoadUrdfFileArgs();
};
interface b3RobotSimulatorClientAPI_NoDirect {
void b3RobotSimulatorClientAPI_NoDirect();
[Const] long getAPIVersion();
void loadURDF([Const, Ref] DOMString filename, [Const, Ref]
b3RobotSimulatorLoadUrdfFileArgs args);
};
I am getting the following error:
glue.cpp:5083:18: error: reference to type 'const std::string' (aka 'const
basic_string<char, char_traits<char>, allocator<char> >') could not bind to
an lvalue of type 'const char'
I think I need a way to convert std::string to const char but I am really
lost on how to do that, I couldn't find any solutions on Google...
If anyone can show me how to resolve this issue, it would be much
appreciated!
Thanks!
--
You received this message because you are subscribed to the Google Groups
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/emscripten-discuss/3a991a6e-a558-4ccf-b10e-c61e05b5896a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.