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

Docker with Conda: GLIBCXX_3.4.29 not found, Libstdc++ Issues in...

Question:I am working on a project using Docker, Conda, and PyTorch. The environment works perfectly on my local macOS, but I encounter the following error when running the Docker container on an...

View Article


Header absolute paths for GCC

I am looking to print a list of absolute paths to a specific header file used by gccwithout compiling anything (or specifying a particular compile target, like with gcc -M). E.g., the following would...

View Article


structure padding compile flag

typedef struct{ char t1; long long t2; char t3;}struct_size_test;printf("sizeof(long long)==[%ld]\n", sizeof(long long));printf("sizeof(char)==[%ld]\n",...

View Article

MWE among object file compiled with and without `-fPIC`

I was doing some experiment with object file produced by gcc.While I know, at least superficially, what is the use of position independent code, I was trying to spot it concretely.I produced this...

View Article

Feature Test Macros, C11 and __USE_MISC

I have a simple code in the file /tmp/prog.c (using a copied line from the open source rdma-core package):#include <stdio.h>#include <stdlib.h>#include <stdint.h>#include...

View Article


Does MATLAB support GCC as a compiler for MEX files? Why isnt it listed on...

I am a total noob when it comes to compiling MEX files for MATLAB. I am thoroughly confused by the different versions of things, compilers, MATLAB versions, etc.I have MATLAB 2013a, 64-bit, on a...

View Article

Why does a call to a pointer to member function handle virtual functions even...

https://godbolt.org/z/W8b3TG5f6struct A { int __attribute__((noinline)) call(int a) { return (this->*mfuncP)(a); } int __attribute__((noinline)) returnArg(int a) { return a; } int (A::*mfuncP)(int)...

View Article

gcc .so binding fails on ubuntu 24 when built on ubuntu 22

I build a C++ program and a shared lib (mylib.so) on ubuntu.If i build and run the program on ubuntu 22 (gcc 11.4.0) everything is fine.If i try to run the same binaries on ubuntu 24 this fails to load...

View Article


Why libgomp keeps creating new thread?

I'm running a openmp program (gcc and libgomp on CentOS 8.5). I used strace to inspect and found that syscall clone was called over and over again (I posed part of the log below), which I believe...

View Article


sys/user time & childs sys/user time in linux

Based on example 8.31 of APUE, suppose the following code. This example shows user/sys time of a process and also user/sys times of child processes for each command (passed as argvs)#include...

View Article

Best way to ensure compatibility of C/C++ structs in shared memory between...

IntroductionI am looking for advice on the best way to guarantee a particular layout in memory of a data struct to be passed from one CPU to another via shared memory in an asymmetric multiprocessing...

View Article

Prevent gcc from optimization/removal of variables when using -Wl,--gc-sections?

I have an ARM project, where I would like to keep certain unused variables and their data, until the time they are used.I have seen prevent gcc from removing an unused variable :__attribute__((used))...

View Article

Header search paths with gcc using C_INCLUDE_PATH

i'm confused about the following include files(with GCC)i've A.c and B.c in folder AAAand B.h in folder BBBin A.c:#include <stdio.h>#include "B.h"main(){ errPrint();}in B.c:#include...

View Article


Is assigning a pointer in C program considered atomic on x86-64

https://www.gnu.org/software/libc/manual/html_node/Atomic-Types.html#Atomic-Types says - In practice, you can assume that int is atomic. You can also assume that pointer types are atomic; that is very...

View Article

Using the boost::asio::co_spawn function across multiple modules can trigger...

When I use co_spawn across multiple modules and enable optimization levels O2 or O3, I encounter a linker error during the linking phase. It appears that the compiler discards some symbols it deems...

View Article


GCC version update

I need your guidance on how to update the GCC version from gcc-7.3.0 to gcc-13.2 or later.Our system has source code and spec files and each package is built using rpmbuild.I checked the...

View Article

How to link a Dll

How can i link a dll? I use windows and minGWthis is the content of the folder:dll.dllmain.cppthe a main.dll is compiled with:g++ -c dll.cppg++ --shared -o dll.dll dll.oThe content of dll.cpp:#include...

View Article


make for pgvector takes a long time with no status indicator

I am trying to install pgvector on an Ubuntu 22.04.4 LTS server with PostgreSQL 14.13.I resolved the header error via the suggestion in the installation notes. Now I seem be getting the following...

View Article

Can I set up a Code::Blocks project to set its focus back to the Code::Blocks...

Every time I finish executing a C++ console program, and I press any key to exit, the focus doesn't go back to Code::Blocks' screen.I'd like to execute a program multiple times by pressing F9, without...

View Article

printf() prints only the first character

Recently I came across an example from the book "The C Programming Language" and decided to run it:#include <stdio.h>#define IN 1#define OUT 0int main() { int c, nl, nw, nc, state; state = OUT;...

View Article
Browsing all 22237 articles
Browse latest View live


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