首页 > 其他 > 详细

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

时间:2015-04-10 17:06:19      阅读:3691      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!