问题标签 [gcc4.7]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c++ - Windows的gcc端口中thread_posixs和thread_win32有什么区别?
我想下载适用gcc 4.7.2
于 Windows 的最新可用版本的编译器。当我到达本应该看到下载链接的页面时,我遇到了两个类别:
- 线程-posix
- 线程-win32
这两者有什么区别?它们只是线程实现吗?我的意思是它们只是在实现方式上有所不同,因此最终结果(类,如何使用它们等)保持不变?还是他们强加了特定的编码风格?
c++ - C++11初始化类静态常量数组
这就是我正在尝试的。MinGW g++ 4.7.0。
我尝试编译它并获得以下输出:
C++11 是否应该允许在这样的类中初始化静态 const 数组?还是必须像 C++11 之前那样在类之外定义它?
c++ - C++ error: was not declared in this scope with private after public
Attempting to modify the code from this page.
Here's the problem code:
When I compile it, I get these errors:
When I move the private sections before the public sections in each class, the errors go away.
I've tried compiling with MinGW GCC 4.6.2 and 4.7.0 and get the same results. Is this a bug, or is there something else going on?
c++ - 常量 QList警告 = QList() << 0; gcc 4.7.2 的段错误
所以主题行中提到的代码会导致 Qt 4.8.3 和 gcc 4.7.2 出现分段错误
这位于 .cpp 文件的任何类/结构之外,适用于 gcc 4.4
Traces 给出了这两个提示:
因此,在将后一个列表插入其中时,似乎“警告”尚不可用。
如果我将其更改为以下内容,则适用于 4.7.2:
这是一些功能:
我想知道为什么会这样?
编辑:
我想我最初从我的问题中剪掉了太多东西,但是警告应该是文件范围(.cpp-file)中的 const 用于保存一堆枚举。
c++ - c ++:按值复制到函数参数在vs2012中产生两个对象
这是在 g++ 4.7 和 vs2012 (cl17) 中产生不同输出的代码。
GCC 输出是13242
,而 cl 输出132242
。
为什么 cl 编译器A
在堆栈上创建副本时会生成第二个对象,目的是什么?
c++ - gcc c++11 limits for user defined constants and template parameter packs
I've been playing with user defined constants in gcc 4.7.2 and ran into some sort of size limiting factors which I do not quite understand.
The idea was to define a constexpr operator "" for fixed point decimal type. I want to avoid casting from double but rather parse mantissa and exponent at compilation time using variadic templates. The mantissa parsing proved a bit tricky.
When I enable any of the 3 disabled lines at the bottom of the code below, gcc falls into infinite loop and hangs there. I noticed the same max size for floating point literal and explicit instantiation of the variadic template but slightly larger size for integer literal.
I used command: g++ -std=c++11 -Wall -g -o literal_value literal_value.cpp
Using -ftemplate-depth-128 makes no difference.
Is that a bug in gcc or am I missing something?
gcc - gcc-4.7 和 openMP 缺少 ___emutls_get_address
我正在尝试在 Mac OS 10.8.2 上使用自编译的 GCC-4.7.1 编译程序。程序使用openMP,编译成功;但是,当我尝试运行程序时,动态链接器会抱怨
这个问题经常出现在使用 -fopenmp 编译的任何程序中,包括 MWE
请注意,什么是“___emutls_get_address”符号中建议的解决方案?,即-lgcc_eh
在链接阶段添加,不起作用(我仍然收到相同的 dyld 错误消息)。
c++ - #包括导致很多'' 尚未声明错误
我正在尝试编译我的“图形”引擎,但在包含<string>
(Debian 测试 64 位)之后遇到了问题。
这是错误:
是GUI.h
:
并且GUI.cpp
是:
IGUI.h
看起来像这样:
到目前为止,我有点难过。我尝试安装 build-essentials,但它已经安装了。经过一番谷歌搜索后,问题似乎是某处缺少一些依赖项,但我不知道在哪里......
有人有想法么?
干杯