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

How does #include work in C++? [duplicate]

This question already has an answer here:Why should I not #include <bits/stdc++.h>? 4 answersI have read from a codeforces blog that if we add #include <bits/stdc++.h> in a C++ program then...

View Article


Error compiling OpenCV, fatal error: stdlib.h: No such file or directory

I'm trying to compile OpenCV. I've tried the master branch (which is currently on commit dc9602e) and version/tag 3.1.0. I'm using Fedora 24, I first tried using gcc that comes with Fedora (gcc (GCC)...

View Article


Trouble building gcc on Mac - can't find system headers

I'm on a Mac running OS-X High Sierra and wanted to create a separate build of gcc. Lemme share a little of the process it took me a week to work out so it will help others:I made a safe directory...

View Article

GCC 9 header errors when installed with homebrew

I've got GCC 9 installed via homebrew on macOS Catalina 10.15.1. I'm setting -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk. When compiling a file that includes stdio.h, I get...

View Article

Format of GCC-style line directives

GCC's documentation for #line directives says that they are like this:#line "myfile.cpp" 123 But when I check the output with g++ 5.1 they actually come out like this:# 1...

View Article


GCC 8.3.1-3 on Red Hat fails on template class with static function using...

When working with the devtoolset-8 on RedHat 7:[eftlab@49af022e5a7c git]$ which g++ /opt/rh/devtoolset-8/root/usr/bin/g++ [eftlab@49af022e5a7c git]$ /opt/rh/devtoolset-8/root/usr/bin/g++ --version g++...

View Article

Errors with libexa when compiling xorg-server

I am trying to compile the xorg-server version 1.20.5.LDFLAGS="-lrt" ./configure \ --prefix=/usr \ --enable-glamor \ --enable-config-udev \ --enable-config-udev-kms \ --enable-suid-wrapper \...

View Article

GCC Stack overflow by negative number

I'm getting a very strange error msg. A negative Flash overflow. How is this possibleI'm calling a debug function to print out error msgs on multiple occasions. This error logger function looks like...

View Article


CMake passes all gcc flags to nvcc as well

My project uses cuda kernel for a small module and needs nvcc for compiling. During compilation, cmake pass the same linker and compiler flags intended for gcc to nvcc as well. In my particular case, I...

View Article


Mismatched deduction of auto types between different c++ compilers

So, I am trying to implement the dot product (https://en.wikipedia.org/wiki/Dot_product) in some flavour of modern C++ and came up with the following code:#include <iostream> template<class......

View Article

How to install an older version of gcc on Fedora

I tried to install CUDA on fedora 31 but got stuck at the last step because CUDA officially support fedora 29 (gcc 8.2) while the version shipped with fedora 31 is 9.2, I then installed pytorch with...

View Article

Declare a symbol's type in ldscript

I want to declare the type (specifically STT_FUNC) of a symbol that I declared in my ldscript.Is such thing possible, and if it is then how?For example, I have the following:funcy = 0x11223344; I would...

View Article

Why I cannot compile ARM BE8 ELF using GCC?

Iv'e been trying to compile the following code for an ARM BE8 system (running little-endian code with big-endian data access).My code looks as follows:.global main .type main, %function main: ldr pc,...

View Article


Openmp with mex in Matlab on mac

I have OS X El Capitan and Matlab R2016a and I would like to use OpenMP, which has previously worked. I have managed to install gcc-5 via homebrew and have openmp working there. I can see from this...

View Article

bytes value of 8 bytes or 16 bytes number

I assume every byte should be valued 0 if a long var is initialized to 0. (same for __int128)This is a piece of testing code: int64_t i64 = { 0 }; auto addr = &i64; LOG(INFO) << "i64...

View Article


Is there a way to port "best type" floating-point constants from a micro to...

In my specific case, I firstly developed a program to run in a Texas Instruments microcontroller (TMS320F28335). It was a real time synchronous generator simulator so it needed to perform an important...

View Article

GCC -H option issue (header dependency tree listing)

GCC can display all header dependencies of a .cpp file in a tree structure if the -H option is passed. It's a very handy feature because 1) it produces the output after/while evaluating the defines...

View Article


ImageMagick: OSError: /lib/libc.so.6: version `GLIBC_2.XX' not found

I am working on an embedded linux system and try to get python-wand running...But i am not able to install anything on this system so i included them in the lib folder of my application (this folder...

View Article

Why does address sanitizer overlook seg faults sometimes?

Been using fsanitize=address while compiling C programs, in order to track seg faults for about a year now. Every now and then I encounter a strange behavior, my program would be seg faulting if...

View Article

Shared library name in executable is different than the filename

A cleaned up version of my compile command looks like gcc -o semantic_seg -Wl,-rpath,... -l:libnvrtc-5e8a26c9.so.10.1 ... and I have a dynamic library file named exactly libnvrtc-5e8a26c9.so.10.1 in...

View Article
Browsing all 22000 articles
Browse latest View live


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