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

openmp for loop is not parallelized

I'm trying to measure the running time of the parallel version and the serial one.I have such a program:#include <stdio.h>#include <stdlib.h>#include <stdbool.h>#include...

View Article


gcc AtomicBuiltins strange behavior in gcc 4.1.1

In gcc doc the link gcc-doc I see gcc version 4.1.1 has the atomic builtins functions.in my project ,we use gcc 4.1.1 in centos5.0,then after compile our project runs well after centos5.0. Here is my...

View Article


getting ld to ignore undefined references when making a DLL

I'm trying to get gcc's ld to ignore unresolved references when putting together a shared library from a bunch of object files compiled with -fpic flag.I tried a bunch of options so far such as...

View Article

Compiler warning about large atomic operation

The following code generate a compiler warning when running in Clang but emits no warnings in GCC.#1 with x86-64 clang (trunk) :29:13: warning: large atomic operation may incur significant performance...

View Article

Trying to run in sublime. error ocured : collect2.exe: error: ld returned 1...

gcc my.cppc:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\VENKAT~1\AppData\Local\Temp\cccMqWsr.o:my.cpp:(.text+0x19): undefined reference to std::cout'...

View Article


Cannot read sectors from disk in C

I'm using an i686-elf-gcc cross compiler to generate code to run in real-mode.I'm trying to read a sector from my kernel. I know this is the location where my kernel is located, in the second sector,...

View Article

On which target platforms does GCC not support dollar signs in identifiers?

Dollar signs in identifiers are not strictly conforming to the C standard, but are a widely implemented extension. The GCC documentation says:In GNU C, you may normally use dollar signs in identifier...

View Article

OpenMP parallel filling of an array with ~50E6 random values [duplicate]

I want to notice the difference between a parallel function and a sequential one.I wrote a function foo() that fills an array of 50 million numbers with random values.I have this code:#include...

View Article


How gcc add an optimization options?

I would like to add an optimization option in GCC8.2.0 to control the opening and closing of an optimization pass I added.I successfully added a pass, and use "fdump-tree-all" to compile the program to...

View Article


Can't install PBC library on Cygwin (Undefined reference to GMP)

I installed Cygwin but I can't figure out why it can't find GMP library. This is what I've done:I installed Cygwin with these package: glib2.0-debuginfo, libglib2.0-devel, libglib2.0-doc, libglib2.0_0,...

View Article

Performance improvement of math.h functions by rewriting with AVX intrinsics

I have a simple math library that gets linked into a project which runs on simulator hardware (32 bit RTOS) and the compiler toolchain is based on a variant of GCC 5.5. The main project code is in...

View Article

Two compilers (clang vs gcc) have different api for signals?

Having this in c:#include <stdio.h>#include <unistd.h>#include <signal.h>void handler(int num){ write(1, "I won't die!\n", 13);}int main(){ signal(SIGINT, handler); while(1){...

View Article

Reliable source of prebuild binaries of GCC/G++ for Linux/Windows/OSX [closed]

I am working on a cross-platform C++ game that needs to supply GCC/G++ to its users in order to compile/link mods from source that are also written in C++, and I need a reliable source of binaries to...

View Article


Installing gevent on Centos error gcc

I've installed all the requirements (I think) but I still get errors when runningpip install geventI've also tried installing from github with the same error below:error: command 'gcc' failed with exit...

View Article

Why is gcc's right-shift code different in C and C++ mode?

When ARM gcc 9.2.1 is given command line options -O3 -xc++ -mcpu=cortex-m0 [compile as C++] and the following code:unsigned short adjust(unsigned short *p){ unsigned short temp = *p; temp -=...

View Article


What is the difference in gcc between lto and fat-lto-objects

I have tried to compile to assembler my source code with next flags:1. -flto2. -flto -ffat-lto-objects3. -flto -fno-fat-lto-objectsThird one provides optimized slim LTO code as written in...

View Article

undeclared errors during compilation of R RODBC package

I am trying to install RODBC1.3-16 package on AIX7.2 with R base 3.6.1. unixODBC-devel-2.3.5-1.aix6.1.ppc.rpm has been installed with sql.h, sqlext.h files inside...

View Article


How can I keep a symbol during gcc strip?

Using arm-linux-gnueabi-gcc, I'm working with a shared object that has an undefined reference to "main". I'm using dlopen() to open this library. However, when my program is compiled with "-Wl,-s", the...

View Article

Cannot use CSS in GTK+ 3, using GtkCssProvider

I'm writing a text editor in C with GTK+ 3, but I've encountered an issue I have not been able to resolve. I'm trying to add a global stylesheet for the entire application, but the style won't...

View Article

How to debug C++ program in VSCode with file added

I work fine with debugging without adding a file, however, I do not know how to deal with it with file added.The commands are as follows:g++ -g --std=c++11 lab1.cpp -o lab1./lab1...

View Article
Browsing all 22467 articles
Browse latest View live


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