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

Greenhills link script to Gcc link script porting for ARM target

I have one application was compiled with Greenhills compiler before, I am trying to use arm-Gcc compiler to compile it, when I try to link the objects with link script (.LD), I got syntax error. I know...

View Article


"Nonrepresentable section on output" when compiling GCC

I'm trying to compile the GCC from source with module-TS support and I cloned to the devel branch (as stated here) : git clone --branch devel/c++-modules git://gcc.gnu.org/git/gcc.git SRCDIR Here's my...

View Article


Is this really a dependent template name?

I have some code that fails to compile, which I reduced to the following minimum version:class Builder { public: Builder() {} auto foo(int) -> Builder & { return *this; } template<typename...

View Article

Having a different version of a dependency based on a conan profile

We have several projects for an embedded Linux environments. We are switching to Conan for our dependency management. The shared libraries for these projects are turned into conan packages. These...

View Article

clang vs gcc: function lookup with operator overloads

in clang vs gcc trunk (as of March 2020) I find strange behaviour in function lookup (can you please educate me on how this is actually called, does it belong to overload resolution?) when using...

View Article


Why am I getting a "duplicate symbol" error for my functions in C?

I have three C files, main.c, function1.c, and function2.c. I compile them using gcc -o main main.c function1.c function2.c. I have a helper function helper() defined in function1.c. So function1.c...

View Article

How can I downgrade GCC 7.5 to 7.4 ? (Ubuntu 18.04)

I bought a Dell PowerEdge T430, which has no graphics cards, and installed an old Nvidia 6200 TurboCache card on it. It is recognized in the lspci | grep VGA command, but the drivers are not intalled.I...

View Article

gcc linking with dynamic libraries, undefined reference error

I'm making a program that needs to be linked to a third party SDK which comes in the form of header files and precompiled shared libraries. The program itself is simple, it just calls one function from...

View Article


G++ 4.9.2 and 8.2.0 - final binary's dependency with default lib path...

I encountered an odd difference between the binary produced by a 4.9.2 G++ and a 8.2.0 G++ on a Linux, when upgrading from the former to the latter. I was able to narrow it down to the below minimized...

View Article


Use ThreadSanitizer's Mutex names in code

I'm using GCC 9.2 TSan to analyze my codebase's runtime multithreading behavior (using pthreads explicitly -- we started before C++11). I have a data race while a destroyed mutex is held, with the...

View Article

gccgo, AIX: compiled .o files does not contain .go_export section

I am trying to build gccgo (9.2) on AIX and facing now a problem I can't solve.The machine: AIX 7.1, Processor Type: PowerPC_POWER7, CPU Type: 64-bit, Kernel Type: 64-bitThe Error: "./sync/atomic.gox...

View Article

pythia8240 code compiling: error adding symbols: DSO missing from command line

I'm compiling a code in Pythia, version 8.240 on Linux (Ubuntu 18.04`).Command im using is:$ make Analysistau1 the Makefile uses the following shell command:g++ -g -I$(pythiainc) -I$(tauolainc)...

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


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

Error when using gcc (minGW) to build .exe with same filename?

I've been trying to build another .exe file with the same name in minGW, but everytime I run the command: gcc file.c -o file.exe I run into the problem...

View Article


Gcc Will Not Set Entry Point

I am trying to set my main function to be the first executable code in my program and to bypass the libc startup code. I want a very basic output so I can observe the assembly code generated. I'm...

View Article

ld cannot find shared library even with -L specified

I'm trying to compile a C file against a shared library at a specific location (/home/user/cuda_sync_analyzer-install/lib/libInsertTimingInstr.so), but ld cannot seem to find it -$ gcc -g...

View Article


GCC -T link option issue

I have compiled the project with arm-none-eabi-gcc to object with commandarm-none-eabi-gcc --specs=nosys.specs -mcpu=cortex-m7 -mtune=cortex-m7 -Os -g -gdwarf-2 -c $< -o $(@) currently I got the...

View Article

Stack is totally messed up by trying to produce a buffer overflow

after hours of debugging without any effort, I hope to find some help here on StackOverflow.I'm currently on a PTP training and due to the fact that I'm only using Linux, i also want to practice the...

View Article

error : unknown use of instruction mnemonic without a size suffix

Here the entire source codevoid asmFunction() { unsigned char threshold[16]; initArray(threshold, 75-128, 16); unsigned char counterC2[16]; initArray(counterC2, 128, 16); unsigned char buffer[SIZE];...

View Article
Browsing all 22006 articles
Browse latest View live