Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Browsing all 21993 articles
Browse latest View live

Is there any motivation of using GCC __builtin_object_size at source code level?

I know this is not new, but recently I came across the topic of GCC __builtin_object_size() function. For what I read from the documentation, it states that the intended use can be as follows: The...

View Article


GCC 7 C++ 17 support for folding expressions

The following snippet will compile in GCC 8+, but fails to compile in GCC 7. template <typename... THINGS> struct A { explicit A(THINGS *... things) { (..., [thing = things](){}()); } }; int...

View Article


error: ‘int pow(double, int)’ conflicts with a previous declaration int...

My linux version is 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20) x86_64 GNU/Linux My gcc version is 8.3.0 i want to compile and run Sniper 7.2 with Pin 3.5. i am trying to compile...

View Article

What is the meaning of this code line?? and What is the solution for the...

What is the meaning of this code line?? and What is the solution for the error?? I have this issue in Sniper Simulator version 7.2 with Pin 3.5 on Linux Debian 4.19.67-2+deb10u1 (2019-09-20) x86_64...

View Article

Image may be NSFW.
Clik here to view.

for c/cpp include path by adding the path to system file and run

A file called test.cpp in ~/test code is #include <stdio.h> #include "add.h" int main(){ printf("%d\n",add(1,2)); } file add.h is in ~/test/1, which is just a subdirctory code is int add(int a,...

View Article


GCC4.1.2, GCC6.3.0, using "-fPIE -Wl,-pie"

Lets say I have an project which has an library in which I have one function which returns a single value, for example: unsigned long cFun1() { return 1000; } Then, I have an mock of the function in...

View Article

Execute .c file to generate .exe from c# Form Application

I'm trying to use gcc compiler to get Output exe file. When I perform this from file explorer and cmd manually it work as expected but through Code no output is generated. I'm new to this C# and any...

View Article

Got error on installing pyfastext on Mac: command 'cc' failed with exit status 1

I just got an error on installing pyfasttext. cogent@MBP: pip install --user pyfasttext And then I got these: Collecting pyfasttext Downloading...

View Article


GCC inline assembly read value from array

While learning gcc inline assembly I was playing a bit with memory access. I'm trying to read a value from an array using a value from a different array as index. Both arrays are initialized to...

View Article


-O1 alters floating point math

The following c++ program gives a numerically different result when compiled with -O0 or -O1. #include <iostream> #include <array> #include <cmath> #include <iomanip> int...

View Article

why it not takes third value that b3.name = getchar();

#include<stdio.h> struct Books { char name; }; int main() { struct Books b1; struct Books b2; struct Books b3; b1.name = getchar(); printf("%c\n",b1.name); b2.name = getchar();...

View Article

Compiling with arm-fsl-linux-gnueabi-gcc: int64_t is 32 bit long

I'm cross compiling for imx28 cpu with arm-fsl-linux-gnueabi:[vladimir@vladimir src]$ arm-fsl-linux-gnueabi-g++ -v Using built-in specs. Target: arm-fsl-linux-gnueabi Configured with:...

View Article

Why binary data file is bigger then data?

I use binary file for saving and reading 1d array of data using C. Here is the code for the int type:#include <stdio.h> #include <stdlib.h> int main () { FILE * pbFile; char * fName =...

View Article


How to statically link all libraries except glibc using make/gcc?

I am trying to compile a program to have all libraries statically inside the final binary, but I still want glibc to be dynamically linked. If I use "-static" it compiles ALL libraries statically,...

View Article

C/С++. Why could a simple integer addition on a volatile be translated to a...

I wrote a simple loop:int volatile value = 0; void loop(int limit) { for (int i = 0; i < limit; ++i) { ++value; } } I compiled this with gcc and clang(-O3 -fno-unroll-loops) and got different...

View Article


How can I specify libraries for gcc via the PATH variable

I want to use the python boost library. I am using a compiler gcc. The path variable in Windows shows the paths to the boots main folder. Can I use this or another system variable to specify the paths...

View Article

Compilation error after upgrade to gcc 9 when using concepts with argument...

I have a code that uses a concept with argument pack in if constexpr context. It used to compile and work in gcc 8 but breaks in gcc 9:#include <utility> #include <tuple> template...

View Article


Recipe for target 'all' failed when trying to install PSRSoft?

I am trying to install the PSRSoft software package so that I can preprocess pulsar signal data and I am having a problem with the installation. The software package can be found on this...

View Article

Why does gcc warn when lambda parameter shadows private member of base class

When enabling -Wshadow during compilation, why does gcc warn when the name of a parameter of a lambda defined in a derived class "shadows" the name of a private member variable of its base class?...

View Article

How to compile program with older version of GLIBC? [duplicate]

This question already has an answer here:Deploying Yesod to Heroku, can't build statically 3 answersWhen I'm trying to launch cross-compiled program on target system, I get error:libc.so.6: version...

View Article
Browsing all 21993 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>