求帮忙,要挂了

Compile++ thumb: cocos2dlua_shared <= ConnectHandler.cpp
jni/…/…/Classes/engine/net/ConnectHandler.cpp: In member function ‘virtual void ConnectHandler::onData(void*)’:
jni/…/…/Classes/engine/net/ConnectHandler.cpp:108:26: error: ‘htons’ was not declared in this scope
length = htons(length);
^
jni/…/…/Classes/engine/net/ConnectHandler.cpp:128:30: error: ‘htonl’ was not declared in this scope
protocol = htonl(protocol);
^
At global scope:
cc1plus: warning: unrecognized command line option “-Wno-extern-c-compat”
cc1plus: warning: unrecognized command line option “-Wno-extern-c-compat”
make: *** Error 1

make: Leaving directory `/Users/007/Documents/game6/client/code/NewGame/frameworks/runtime-src/proj.android’

cocos2dx 3.3 lua工程编译android的时候居然报htons找不到,额,我已经在C++代码里已经引用了对应的文件
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>

#include <netinet/in.h>

额,求大神解答,NDKr9b和NDKr10c都试过了,有人遇见过吗?这段代码在cocos3.0的C++工程上跑得没问题~

3.4引擎,ndk r10c。 HelloWorld工程。

头文件
#include <netinet/in.h>

调用
auto a = htonl(10);
auto b = htons(10);

编译通过。

按道理正常来说是OK的,但为啥我的不行捏?mk没对,这也不会啊,一个个写cpp还有问题?
莫非真要去试试3.3 创建helloworld?
ios是没问题的~求大神解救出苦海!

你先试 3.3 HelloWorld 有没有问题。

3.3 HelloWorld 没有问题,但是我很好奇,这种问题大神们有遇见过么??RP不好?不会吧

清掉 obj,重新编译。

还是不行,我囧~~咋办~IOS下没问题呢