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

Image may be NSFW.
Clik here to view.

why this recursive programis having garbage value even after assignment [closed]

The values in image appear from nowhere:What are these values and if they are garbage values then why they are still present after assigning J the value. I am also attaching the source code.int...

View Article


GCC -g vs -g3 GDB Flag: What is the Difference?

When compiling C source code with either gcc or Clang, I always use the -g flag to generate debugging information for gdb.gcc -g -o helloworld helloworld.cI noticed that some people recommend -g3...

View Article


How to define a string literal in gcc command line?

In gcc command line, I want to define a string such as -Dname=Mary, then in the source code I want printf("%s", name); to print Mary.How could I do it?

View Article

Include openssl/libcrypto statically

I am trying to compile an app with static curl and i it seems OpenSSL is not properly linked.COMPILE CMD:$(CXX) $(CXXFLAGS) program1.cpp /opt/curl-7.62.0/lib/libcurl.a...

View Article

Why in C does the function sizeof() output the size of right most operand...

I have the following code in C:#include <stdio.h> void main() { printf("%d %d\n",sizeof(5),sizeof(5,5)); printf("%d %d\n",sizeof(5),sizeof(5.0,5)); printf("%d %d\n",sizeof(5),sizeof(5,5.0)); }And...

View Article


How to vectorize and optimize this functions in C?

I have this functions, the result is correct but the compiler don't vectorize this.How can I achive that the compiler vectorize this and how can I optimize this codes?void LongNumSet( char *L, unsigned...

View Article

gfortran: error: libgfortran.spec: No such file or directory

I am attempting to install and run gfortran-8 on macOS with the following makefile. I installed it from http://hpc.sourceforge.net/ (8.3 version). I keep getting this error: gfortran: error:...

View Article

crtatmega328p.o:(.init9+0x0): undefined reference to "main"

I have been trying to compile a robot simulation.I created an empty file called test.c and tried to compile a test using:avr-gcc -mmcu=atmega328p test.cAVR-GCC it's installedcopt@copt:~$ avr-gcc...

View Article


Setting a C array as a new call stack (ESP) from inline asm?

As hinted from my title, I am interested if it would be possible to allocate a C array, and make it behave like a stack by pointing ESP register to it accordingly.Some code example...void foo(){ int x...

View Article


Install argon2 in Docker image (problem with installing gcc)

right now I'm trying to setup argon2 in a docker image. Apparently I have to install gcc before (and I don't just want to install it on my local machine). My Dockerfile looks like this:FROM...

View Article

GCC force warning to be an error: excess elements in array initializer

My projects have to compile with two different compilers. One that creates a DLL (for a PC simulation, Mingw32-gcc-4.7.2) and another one that creates an ELF (for real hardware). Both compilers have...

View Article

How to see which flags -march=native will activate?

I'm compiling my C++ app using GCC 4.3. Instead of manually selecting the optimization flags I'm using -march=native, which in theory should add all optimization flags applicable to the hardware I'm...

View Article

How to know my code is running on CPU or GPU?

I am a beginner in OpenACC. I want to speed up my program by using OpenACC in fortran language with GCC compiler. my Code is :Program Test use openacc Implicit None...

View Article


Image may be NSFW.
Clik here to view.

An issue with the run configuration

I have an issue with the Eclipse.When I choose Generic MPICH2.... and local the option to choose connection is unclickable.

View Article

nm symbol output t vs T in a shared so library

I have added a new function (fuse_lowlevel_notify_inval_directory) in user space fuse library.The compilation and creation of libfuse.so is finished without error.But when my application tries to use...

View Article


Why compiler doesn't vectorize this function?

I executate the code with the comand gcc -O3 -ffast-math -msse -funroll-all-loops -ftree-vectorize -fopt-info-vec-missed -lm -g $1 -o ${2}.O3 but the compiler doesn't vectorized this function missed:...

View Article

How do I find out what error is occuring when installing 'diptest' with gcc...

I am trying to install something called 'diptest' from a local copy of this https://github.com/alimuldal/diptest on centos via the command line. I have installed everything I can for gcc. The gcc...

View Article


For a given source file, how to see the chain of #include substitutions a...

A similar question exists here C/C++: How to figure out the chain of header files for a given definition?, but mine is different in that I do not use Visual Studio, (I use GCC and Clang).

View Article

Getting undefined reference when trying to build using gcc

I am trying to build a C++ static library in Linux (Ubuntu 18.04 in my case) using GCC using a Makefile. I noticed the issue is not with the makefile itself but the way I'm trying to compile and build...

View Article

Why does unaligned access to mmap'ed memory sometimes segfault on AMD64?

I have this piece of code which segfaults when run on Ubuntu 14.04 on an AMD64 compatible CPU:#include <inttypes.h>#include <stdlib.h>#include <sys/mman.h>int main(){ uint32_t sum =...

View Article
Browsing all 22000 articles
Browse latest View live


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