Questions tagged [gcc4.7]

Version 4.7 of GCC (GNU Compiler Collection). GCC is the de facto standard C compiler on Linux (though version 4.7 is not used by modern versions of Linux). The compiler collection supports many other languages and platforms as well.

Version 4.7.0 was released on 2012-03-22. Version 4.7.4 was released on 2014-06-12.

See also:

136 questions
2
votes
1 answer

how to hide local symbol for linux static library

I'm going to ship a to static library to a customer. To maximize the privacy of the library I have restricted symbols for the static library using the technique provided by @ypsu Symbol hiding in static libraries built with Xcode However, the above…
prgbenz
  • 1,129
  • 4
  • 13
  • 27
2
votes
3 answers

gcc: fatal error: limits.h: No such file or directory on macos

I am trying to pip install python-Levenshtein (https://pypi.org/project/python-Levenshtein/) on macos 10.14.5, Python 3.7, and gcc 4.7. This fails with: /opt/local/lib/gcc47/gcc/x86_64-apple-darwin16/4.7.4/include-fixed/limits.h:169:61: fatal error:…
pedjjj
  • 958
  • 3
  • 18
  • 40
2
votes
0 answers

Do GCC built in atomic functions provide processor level memory barrier fences?

I have to use GCC version 4.7.3 which I understand is not fully C++11 compliant (see https://gcc.gnu.org/gcc-4.7/cxx0x_status.html ) and I want to use the GCC built-ins __atomic_load_n etc., on an x86 processor. I am only considering using the…
user827046
  • 21
  • 3
2
votes
2 answers

C Preprocessor: dynamic const char

I'd like to create dynamically a const char at compilation time as follow: const char reprx[] = "repr1\0repr2\0repr3\0repr4\0"; and with a #define to specify the number of time the string reprX\0 is repeated within the string (by replacing X with a…
Darko P.
  • 567
  • 1
  • 4
  • 14
2
votes
2 answers

Changing the GCC Code. How to test the addition of newly added features?

I am learning compilers and want to make changes of my own to GCC parser and lexer. Is there any testing tool or some another way available which let me change gcc code and test it accordingly. I tried changing the lexical analysis file but now I am…
anuj pradhan
  • 2,777
  • 4
  • 26
  • 31
2
votes
1 answer

Not works compilation c++ 4.7.2 in Debian testing x64

I'm trying to do a manual compilation with g++ in debian testing x64bits, The content of my file test.cpp is: #include using namespace std; int main() { cout << "Hola Mundo" << endl; return 0; } but when I run the command, for…
Cristian
  • 1,480
  • 5
  • 32
  • 65
2
votes
1 answer

Why is this stack trace appearing when compiled with gcc 4.7 but not with older pre 4.3?

I have a fairly large binary which I had been building for a while on a pretty old version of GCC (4.1.2). I recently built it with 4.7 but when I run it it crashes with the following backtrace: terminate called after throwing an instance of…
Palace Chan
  • 8,845
  • 11
  • 41
  • 93
2
votes
2 answers

template backward compatibility with gcc 4.7

Take the following code snippet: struct whatever {}; template < template class FOX, typename bat> struct wulf {}; template struct box; template struct…
Palace Chan
  • 8,845
  • 11
  • 41
  • 93
2
votes
1 answer

passing a vector returned from a function to another function

I have a function that returns a vector of strings std::vector getNames() { std::vector names; names.push_back("one"); return names; } I have another class with a constructor with the following signature (this is actually…
denver
  • 2,863
  • 2
  • 31
  • 45
2
votes
1 answer

generating 64 bit code on 32bit debian system

Could you please describe that how have you installed gcc-multilib and g++-multilib on 32bit debian machine to generate 64 bit code? I installed gcc-4.7.2 on my 32bit debian system(and also installed binutils-2.23). When i try to compile a simple…
2
votes
0 answers

Error building boost on Mountain lion using gcc-mp-4.7 installed from macports

I've run into a very very hairy issue. My end goal is to build the cpp-netlib. cpp-netlib uses C++-11, it was throwing linker errors with original boost build in my machine. The reason I'd built boost using the default gcc installed in my machine,…
subramanian
  • 1,005
  • 2
  • 11
  • 21
2
votes
2 answers

Error when running OpenNI 2 class ( gcc 4.7.2 / ubuntu 12.10 )

I'm trying to compile an run a very basic program given below (test.cpp) which calls the OpenNI class. You can see the files and dirs they're in here. Sorry that some characters screws up a little bit in the browser's encoding. I'm using the linux…
Evan Rolfe
  • 151
  • 1
  • 10
2
votes
2 answers

GCC-4.7.2 installation on Cygwin fails

Because default GCC in Cygwin is 4.5.3, I tried to install GCC 4.7.2. I have dowloaded tar.bz archive from here, put it to cygwin\usr\gcc-4.7.2 and proceed the following sequence: tar xvf gcc-4.7.2.tar.bz2 cd…
pidabrow
  • 966
  • 1
  • 21
  • 47
2
votes
2 answers

Static Instance of A Class Does Not Handle Resource Deletion Properly At Program Exit

I discovered this accidentally today when I was working on my project. Basically, in my project, I have something similar to below for resource handling. class Resource { public: static Resource instance_; ~Resource () { …
Jimmy Lu
  • 4,810
  • 7
  • 25
  • 30
2
votes
1 answer

C++11: thread_local or array of OpenCL 1.2 cl_kernel objects?

I need to run several C++11 threads (GCC 4.7.1) parallely in host. Each of them needs to use a device, say a GPU. As per OpenCL 1.2 spec (p. 357): All OpenCL API calls are thread-safe75 except clSetKernelArg. clSetKernelArg is safe to call from any…
Quiescent
  • 1,088
  • 7
  • 18