I'm trying to bind C++ with Javascript. ref :
http://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/WebIDL-Binder.html
*c++ object.*
class Foo {
public:
int getVal();
void setVal(int v);
};
class Bar {
public:
Bar(long val);
void doSomething();
};
*WebIDL*
interface Foo {
void Foo();
long getVal();
void setVal(long v);
};
interface Bar {
void Bar(long val);
void doSomething();
};
Following the instruction specified on the link above, I successfully made
glue.cpp / glue.js
I also made this below, as what the tutorial says. ( *my_glue_wrapper.cpp* )
#include "ex.cpp"
#include "glue.cpp"
and I tried to bind them with this command ( as the instruction says... )
emcc my_classes.cpp my_glue_wrapper.cpp --post-js glue.js -o output.js
But
<https://lh3.googleusercontent.com/-TXNp3Z_vrKo/VtlUCD2P8qI/AAAAAAAAAiU/lwHjGu5TONs/s1600/12312323.png>
This unresolved symbol occurs there and as a result, I can't invoke the
function in javascript.
<https://lh3.googleusercontent.com/-LM7LDIBhHos/VtlUV7N7KyI/AAAAAAAAAiY/eh7fSWa9Mxg/s1600/qwsadasd.png>
I'm relatively a newbie when it comes to C++. ( My major lang is C#/Java )
So I can't even imagine what is the wrong with it...
Seriously, how can I solve this problem?
--
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].
For more options, visit https://groups.google.com/d/optout.