码迷,mamicode.com
首页 > 其他好文 > 详细

error: invalid 'asm': invalid operand for code 'w'

时间:2015-04-10 17:06:32      阅读:218      评论:0      收藏:0      [点我收藏+]

标签:

google 出结果

http://stackoverflow.com/questions/15623609/including-curl-into-the-android-aosp

..................................................................................................................................................................................................

You‘re probably getting this error because of some bad includes. One of the commonest reasons this is happenning is because you are compiling cURL with your host includes.

Check that your Makefiles does not contain hard-coded references to /usr/include or any other include paths. This is apparently a common error when people are trying to cross-compile on x86 for ARM. Your compiler is confused because he is trying to parse assembly network instructions such as the rorw (“rotate word right”) x86 instruction as the ror (“rotate right”) ARM instruction.

Some C functions such as htons, which provides network byte order translation (ensuring that there are no endianness issues for example), are implemented as preprocessor macros that contain inline assembly. And an ARM compiler cannot understand x86 instructions, this is why you‘re getting this error. These kind of network translation functions are heavily used in cURL, so the odds are good that this might be your problem.

Here is a   http://thesoftwarerogue.blogspot.fr/2010/05/porting-of-libcurl-to-android-os-using.html   that should help you port cURL on Android. The guy does not compile cURLwith Android but exports cURL‘s functions through JNI.

 

......................................................................................................................................................................................................

 

error: invalid 'asm': invalid operand for code 'w'

标签:

原文地址:http://www.cnblogs.com/ioio/p/4414781.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!