Skip to content
New issue

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

simple app used flashcc socket throws 'terminate called after throwing an instance of 'AS3::ui::var'' #63

Open
oldmanlv opened this issue Jun 8, 2016 · 1 comment

Comments

@oldmanlv
Copy link

oldmanlv commented Jun 8, 2016

source code comm.cpp:

include <Flash++.h>

using namespace AS3::ui;
var connectHandler(void *data, var args)
{
printf("connectHandler called \r\n");
return internal::_null;
}
int main()
{
printf("start1\r\n");

flash::net::Socket socket = flash::net::Socket::_new();
//socket->addEventListener(flash::events::Event::CONNECT, Function::_new(&connectHandler, &socket));
//socket->connect("172.16.8.134", 1935);
socket->connect("45.22.20.23", 1935);
//socket->connect("127.0.0.1", 1935);

printf("end\r\n");
AS3_GoAsync();

return 0;

}

compile command:
"$(FLASCC)/usr/bin/g++" -g $(BASE_CFLAGS) comm.cpp -emit-swf -swf-version=17 -swf-size=200x200 -lFlash++ -lAS3++ -o comm.swf

I googled, but not find much information about the flascc socket, can you tell me why occurs the above error?thks a lot。

@mbolt35
Copy link

mbolt35 commented Jun 13, 2016

Try removing the
AS3_GoAsync();

If that doesn't work, it might be possible that the AS3 header isn't being included (I highly doubt this due to the nature of your issue). Try adding:
#include <AS3/AS3.h>

Let me know if this doesn't work, and I'll give it a shot to see if I can reproduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants