Questions tagged [gcc4]

Version 4.x of GCC (GNU Compiler Collection). It's the de facto standard C compiler on Linux and supports many other languages and platforms as well.

Version 4.0.0 was released on 2005-04-20. Version 4.9.4 was released on 2016-08-03.

See also:

184 questions
0
votes
1 answer

expected nested name specifier - gcc

In this code: Int.h: #include #include "Best_Fit.h" template::type Min_Range,typename Best_Fit::type Max_Range> class Int_Core {//If I move this class to a separate header I'm getting…
smallB
  • 16,662
  • 33
  • 107
  • 151
0
votes
2 answers

gcc-4.2 failed with exit code 1 iphone

I´ve tryed to receive a image, decode and save in Documents file but i had some problem of compatibility with Core Services library and Uikit, after modify Uikit restrictions of different version of Iphone. I have other problem: gcc-4.2 failed with…
David
  • 45
  • 1
  • 5
0
votes
1 answer

How is the address of the .rodata section determined in ELF files compiled using GCC and ld?

I have an old executable ELF file. Now, I recompile its source files using the same version of GCC and a similar compilation environment (almost same). However, when I used readelf to explore the symbol address of this old and newly compiled…
kameler
  • 1
  • 2
0
votes
1 answer

Assembler error in MIPS build of Boost.Test program

I'm writing a unit test program with Boost.Test and cross-compiling it for several embedded platforms in an OpenWrt environment. The Boost version is 1.58. All is fine when building for ARM (using gcc 5.2), however when building for MIPS (using gcc…
Wolfram Rösler
  • 302
  • 1
  • 12
0
votes
0 answers

undefined reference to `__gnu_cxx::__exchange_and_add(int*, int)'

I am trying to build C++ code using GCC 4.3.4 on SLES-15 and getting below error. /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: /lib/libc.so.6: (*IND*+0x0): multiple definition of…
0
votes
1 answer

problem compiling with different gcc versions

gcc version 4.4.6 compiles code successfully. But gcc version 4.8.1 gives compile error. /****************************************************************************** Online C++ Compiler. Code,…
0
votes
1 answer

GCC Issues, generates different output on 2 different (but similar) systems

I am using Brian Gladman's library for EAX encryption in one of my project. The problem is the code works on my local development environment (Ubuntu running under virtualbox) but the same code does not work (encryption incorrect) on a system…
Kunal P.Bharati
  • 949
  • 4
  • 11
  • 19
0
votes
1 answer

Why is one compiler trying to use a deleted copy constructor when a type appropriate constructor is available

I have a template class Property, that wraps around other types: template class Property { private: T value; public: Property() = default; Property(const T& initialValue) : value(initialValue) {} virtual ~Property()…
Sam Coulter
  • 708
  • 1
  • 6
  • 27
0
votes
2 answers

tuning performance of a program by using different combinations of gcc options

To my memory, there was a project to explore the best combination of gcc options(cflag) for getting best performance of the program. If I'm not mistaken, they do it in random test. Could somebody reminder me about the name of the project. It is…
prgbenz
  • 1,129
  • 4
  • 13
  • 27
0
votes
0 answers

Arguments corruption

I'm experiencing weird behavior when data is passed to a certain function in some generated code. The problem occurs whenever optimizations are enabled (-O1, and higher). But not on -O0. The C code is generated by OpenModelica 1.13.0-dev, and…
bl4ckb0ne
  • 1,097
  • 2
  • 15
  • 30
0
votes
0 answers

Objective C code uses Id for interface and Class for the implementation

I have a really old piece of Objective C code as follows: extern void fncDoSomething(id param); // in Code.h However when this function is implemented, the developer decided to use Class instead: void fncDoSomething(Class param) { // in Code.m //…
Robson França
  • 661
  • 8
  • 15
0
votes
0 answers

gccgo-gcc510-cross-compile-for-sparc error: 1. libgcc_s.so.1: version `GCC_4.2.0' not found 2. libgcc_s.so.1: wrong ELF type: ELFCLASS32

As title said, I got error like "libgcc_s.so.1: version `GCC_4.2.0' not found", please someone who knows help, thanks a lot. I am cross compiling a small program with golang with gcc5.1.0 on a Redhat 6.5 x86_64 host for Sparc Solaris 10. I copied…
jimy
  • 3
  • 1
  • 5
0
votes
1 answer

clang run error gcc ok

#ifndef _LIST_H #define _LIST_H typedef int element_type; typedef struct node * p_node; typedef p_node list; typedef struct node { element_type e; p_node next; }node; #endif list list_append(list l, element_type n) { …
user2741869
  • 23
  • 1
  • 2
0
votes
1 answer

Cannot link streams code with gcc

I have a problem compiling the following code: // writing on a text file #include #include using namespace std; int main () { ofstream myfile ("example.txt"); if (myfile.is_open()) { myfile << "This is a line.\n"; …
Roger
  • 151
  • 7
0
votes
3 answers

gcc -fPIC -fPIE: difference betweenn gcc-4 and gcc-6

Preamble: this question is not about Oracle, instead I'd like to understand the fundamental difference between gcc-4 and gcc-6 in the handling of Position Independent Code. So I have decided to try an Oracle 12c installation on a Debian…
broeni
  • 97
  • 1
  • 8