c++ - cocos2d-x 3.8 - Use network extension -


i'm trying use httpclient in cocos2d-x project. i'm using cocos2d-x 3.8 , developing xcode.

some things tried do:

  • i looking cocos-ext.h file , saw network removed. in thread explains moved core: http://discuss.cocos2d-x.org/t/why-remove-network-on-cocos2d-x-3-0-beta/10804
  • i saw in network/httpasynconnection-apple.h there 2 namespaces declared, cocos2d , network
  • when add code compiler says: no member named 'network' in namespace 'cocos2d'

    cocos2d::network::httprequest* request = new cocos2d::network::httprequest();

probably i'm missing something? need add preprocessor macro enable network? param in c++ compiler enable sub-namespaces?

i read documentation here, in cocos2d-x.org , stackoverflow no success.

any appreciated!

this embarrassing, forgot including httprequest header file. missed:

#include "network/httpclient.h" 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -