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

Image may be NSFW.
Clik here to view.

Profile gcc-built app with Xcode Instruments

I want to analyse a console program which is compiled with gcc.Here is my makefileall: buildbuild: program xcrun dsymutil program -o program.dSYMprogram: Class.o main.o g++ -std=c++2a $^ -o $@%.o:...

View Article


Clang does not accept -shared -fPIC -pie compiler flags simultaneously

Given by below code:#include <stdio.h>void output(){ printf("hello \n");}int main(){ output(); return 0;}When the above code is compiled by below command:gcc hello.c -shared -fPIC -pie -o...

View Article


How to change the option of GCC compiler?

I observe with the following command :$ gcc -vThat my compiler has by default the generation of PIE (position independant executable).I want to disable this option, because my OS misidentify ELF file...

View Article

Linker script to add tables to rodata segment

I'm trying to port some code that builds up tables at compile time. I don't want to maintain a stand alone linking script for this. I just want to add a few things to all the magic that the compiler is...

View Article

Image may be NSFW.
Clik here to view.

When creating a new tool collection in Netbeans, why is it not autofilling...

IntroductionI'm helping a developer colleague to set up a cross compiler toolchain in Netbeans 8.2 for the Nano-PI board.We both installed the toolchain following the instructions in this link.Since we...

View Article


Why does gcc's implementation of openMP fail to parallelise a recursive...

I am trying to parallelise these recursive functions with openMP tasks, when I compile with gcc it runs only on 1 thread. When i compile it with clang it runs on multiple threadsThe second function...

View Article

Generating code at compile-time using scripts

I would ideally like to be able to add (very repetitive) C/C++ code to my actual code, but at compile time, code which would come from say, the stdout of a python script, the same way one does with...

View Article

How to fix compilation error while assigning one type of structure pointer to...

I am getting compilation error for below sample code in MacOS however its work fine in following website: https://www.onlinegdb.com.Following gcc compiler version I have in MacOS:gcc...

View Article


Unable to access variable name corresponding to register RTX in gcc

Is it possible to access the variable name if we have an RTX which is a reg that corresponds to a variable declared by the user in GCC?I have found the macro REG_USERVAR_P (RTX) in rtl.h which returns...

View Article


No exe file being generated in C using recent Cygwin versions

GCC 4.9.2 does not create an executable, neither a.out or -o hello.exe. Adding -v to the compile line indicates that -o is switched to a non-existent temporary file, for example: -o...

View Article

Image may be NSFW.
Clik here to view.

What exactly is -fno-builtin doing here?

So I was reading Hacking the Art of Exploitation and in the book, they use the strcpy() function in their C code:1 #include <stdio.h>2 #include <string.h>3 4 int main() {5 char str_a[20];6...

View Article

Ordering of object files and libraries in static linking

I've created a simple static library libvec.a with AR tool from simple addv.o and multo.o. The object file addv.o contains 1 function symbol (addvec) and multo.o contains 1 function (multvec). I have...

View Article

How to zip a gcc compiler?

I would like to use gcc compiler in my aws lambda function. In my application user can upload their code (c, c++) and I have to evaluate it in my lambda function. I am just wondering is there any way...

View Article


Assembly executable doesn't show anything (x64)

Very simple assembly introduction code.Seems to compile ok through gcc -o prog1 prog1.s, then ./prog1 just skips a line and shows nothing, like waiting an input the code doesn't ask. What's wrong?Using...

View Article

Unable to find pthread Eclipse GCC linker issue

I have tried all the other postings on this issue and can confirm I have set up in properties->c/c++ build->Settings->Cross G++ Linker the following:-pthread in the linker flags in the Eclipse...

View Article


How to build ltrace for arm v4 little endian

I didn't understand how can I build ltrace statically for arm v4 little endian.I have gcc cross compiler for that.

View Article

install cuda for pytorch cudatoolkit=10.2 on fedora32 with nvidia optimus system

I have recently switched to fed32 on my ThinkPad E470 with optimus system (see [1])and I am trying to get pytorch cudatoolkit10.2 to work.However, I am struggling with the instruction given in [2] both...

View Article


Will gcc10 upgrade golang library

I try compile golang program to sparc-sun-solaris2.11 with gcc but encountered problem /tmp/go-build442023874/b001/_gomod_.go:3:3: error: __debug_modinfo__ is not a function; //go:linkname is only...

View Article

Compilation error with simple helloworld.c program with gcc

When I tried to compile my helloworld.c with gcc helloworld.c -v -o myhelloworldI have the following error : Using built-in...

View Article

Getting the compiler default include path into a makefile

I am can run a shell command to grab the default include path from the compiler (and append the -I):arm-none-eabi-gcc -xc -E -Wp,-v /dev/null 2>&1 | sed -En '/#include <...> search starts...

View Article
Browsing all 22264 articles
Browse latest View live


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