编译32位时__int128错误 [英] __int128 error when compiling 32 bit

查看:1427
本文介绍了编译32位时__int128错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

c:\...random.h|106|error: expected unqualified-id before '__int128'

当我编译一个32位程序,上面是我的错误。我使用<一个href=\"http://sourceforge.net/projects/mingwbuilds/\">http://sourceforge.net/projects/mingwbuilds/

When I'm compiling a 32 bit program, the above is the error I get. I'm using http://sourceforge.net/projects/mingwbuilds/

为什么呢?我的code编译罚款与4.7.2,但我想更新到4.8的bug修复,它摆脱了指针警告0作为空值时,有没有零。

Why? My code compiled fine with 4.7.2 but I wanted to update to 4.8 for the bug fixes and it gets rid of the 0 used as null value for pointer warnings when there are no zeros.

许多错误修复我想要的。它编译我的那些64位就好在Windows上。

Many of the bug fixes I want. It compiles my x64 ones just fine on Windows.

有没有办法得到它来编译X32应用程序?

Is there a way to get it to compile x32 applications?

推荐答案

__ int128由

__int128 is protected by

规定( STRICT_ANSI )及!&安培;
  定义(_GLIBCXX_USE_INT128)

!defined(STRICT_ANSI) && defined(_GLIBCXX_USE_INT128)

所以,你既可以使用-ansi(如果你的code是严格ANSI C ++的投诉),我面临链接错误,由于这样的事实,链接器无法找到32位的库。

So, you could either use -ansi (in case your code is strictly ansi c++ complaint), I faced errors in linker due to the fact that the linker unable to find the 32bit libs.

_GLIBCXX_USE_INT128

_GLIBCXX_USE_INT128

在LIB / GCC / x86_64的-W64-的mingw32 / 4.8.1 /有/ C ++ / x86_64的-W64-的mingw32 /位/ C ++的config.h我确信生成pretty定义通过自动配置基于该系统的工具链是建立在

is defined in "lib/gcc/x86_64-w64-mingw32/4.8.1/include/c++/x86_64-w64-mingw32/bits/c++config.h" which I am pretty sure was generated by the autoconfigure based on the system the tool chains are built.

您更好的下载MinGW的上海湾合作委员会(二进制)包中的32位版本并安装它们。

You better download the 32bit version on mingw gcc (binary) package and install them too.

这篇关于编译32位时__int128错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆