I have this file :
#include <emscripten.h>
#include <stdio.h>
class BaseClass
{
public:
virtual void foo() = 0;
BaseClass()
{
init();
}
void init()
{
foo();
}
};
class DerivedClass : public BaseClass
{
public:
DerivedClass() : BaseClass(){}
virtual void foo()
{
printf("From DerivedClass");
}
};
int main()
{
DerivedClass d;
return 0;
}
Without any compiler optimization , things work fine and I see the "From
DerivedClass" message printed out.
But , I face an error when the compiler optimization flag is set to "-O2"
Uncaught Pure virtual function called!
Any fix/work-around for this issue.
-Nagappan
--
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.