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

How to fix: double free or corruption (out) Aborted (core dumped) in C++

I've recently been working on a C++ project of mine, and I ran into a problem with the executable: std::string commanddata; std::string input; std::string cmdname; int commandlength = 0; if...

View Article


Gcc compilation "cannot compute suffix of object files: cannot compile"

I'm actually reading the LFS book (version 7.1) and I'm blocked at page 53. Trying to compile gcc, I tried the following command:./configure --target=$LFS_TGT --prefix=$LFS/build/gcc-build...

View Article


which MOV instructions in the x86 are not used or the least used, and can be...

I am modelling a custom MOV instruction in the X86 architecture in the gem5 simulator, to test its implementation on the simulator, I need to compile my C code using inline assembly to create a binary...

View Article

C++ error: intrinsic function was not declared in scope

I want to compile code that uses the intrinsic function _mm256_undefined_si256() (returns a vector of 8 packed double word integers). Here is the reduced snipped of the affected function from the...

View Article

Installing older gcc, gfortran version on mac big sur

I am trying to install (with pip install) on a mac BigSur a python package that needs gfortran.The package was last updated in 2020.I initially didbrew install gccand that brought in gfortran, but my...

View Article


How to disable GCC warnings for a few lines of code

In Visual C++, it's possible to use #pragma warning (disable: ...). Also I found that in GCC you can override per file compiler flags. How can I do this for "next line", or with push/pop semantics...

View Article

Segmentation Fault GLFW3/GLAD

I have a really weird segmentation fault when trying to create a window using GLFW3.Linux kernel: 5.4.0-113-genericNVIDIA drivers: 510.73.05OpenGL (from glxinfo): OpenGL core profile version string:...

View Article

rpath=$ORIGIN not having desired effect?

I've got a binary "CeeloPartyServer" that needs to find libFoundation.so at runtime, on a FreeBSD machine. They're both in the same directory. I compile (on another platform, using a cross compiler)...

View Article


is there a better way to write a cmakefile? [closed]

so I need help this is my first time writing a cmakeFile.txt file and I wanted to know if there was a better way to "describe/format" it, so it makes more sense as to what it does. this is what I have...

View Article


-static option for gcc?

I'm wondering what the -static option on gcc does. I need this option when compiling a certain application, however when I do I get the following error:gcc -static -O3 -o prog prog.c/usr/bin/ld: cannot...

View Article

How do you add command line arguments for specific use to your terminal in...

I'm a bit confused as to how I could add certain parameters in the Ubuntu terminal when using the GNU C compiler to compile the program. For example:gcc -o question question.c./question -e -f...

View Article

How to link GCC for GROMACS on cluster?

Recently I have installed gromacs on the master node of my newly installed cluster. As the major requirement of the gromacs is GCC, OpenMPI and gmx_mpi, after compiling everything on the master node, I...

View Article

Getting tons of errors when compiling a C program

I was trying to run the following program when this big error occurred. What am I doing wrong?#include <stdio.h>#include <fcntl.h>#include <unistd.h>#include <string.h>#include...

View Article


Qt application crash on Wayland

I've recently installed Ubuntu 22.04 LTS on my development laptop. Previously I was running 18.04 so this is my first experience of Wayland. I did a clean installation on a new disc. I had relatively...

View Article

How to print defined macros with pragma to get OS version?

Following these related questions (1,2,3), I'm trying to get OS information from the preprocessor as follows:#include <boost/preprocessor/stringize.hpp>#ifdef __MACH__#pragma message ("MACH: "...

View Article


Why calling LAPACK ilaenv in C with the same parameter will sometimes obtain...

I used a docker container on M1 MacBook Pro with ubuntu 18.04 and ran a C program. In the main function I call ilaenv to check the block size for LAPACK routine DGETRF with size 1000*1000. The function...

View Article

GCC C++ Name mangling reference

Looking around, I see mostly questions about demangling C++ symbols rather than how to mangle them. Yes, one could invoke g++, using the -S option, on some dummy code containing the symbols to be...

View Article


How to downgrade to GCC v.7 (Ubuntu 22.04 LTS)?

I was using g++ v11 and got a compiler error (" *internal compiler error: in expand... ") which as far as i read was introduced in version 8 of g++.So i tried to downgrade to g++ v7 just to end with my...

View Article

How enable c99 mode in gcc with terminal

I want to activate c99 mode in gcc compiler to i read in other post in this forum that -std should be equal to -std=c99 but i don't know how to set it to this value using command line so please help.

View Article

How to prevent GCC from compiling error-prone vsnprintf?

Is it possible to detect at compile time that the fourth argument of vsnprintf() consists of fewer than required by the third argument of vsnprintf()? I mean:#include <stdio.h>#include...

View Article
Browsing all 22096 articles
Browse latest View live


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