Issue
How to solve the compile error?
error: undefined reference to 'ntohl'
collect2: error: ld returned 1 exit status
I use the android-ndk-r10d.
Solution
When building with the Android NDK, ntohl and the other functions for converting between network and host byte order are #defines present in the header <sys/endian.h>. So including that header should fix your compilation error.
Answered By - Michael
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.