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

Cross compiling zbar c library for windows

I'm writing a program in rust that makes use of the zbar library, using rust bindings for zbar from magiclen and want to extend the build script to support building from source. libzbar is normally...

View Article


How can I avoid redefinition of types while including multiple header files?

I'm working on recompiling a C project and I'm not sure how do I fix this problem in a right way. Here is a situation - a.h#ifndef A_H #define A_H typedef int INT; // other variables and function...

View Article


Variable Length array forbidden in ISO C++ error in sublime text 3

I recently changed my C++ compiler, and I am experiencing this strange error that says ISO C++ forbids variable length array. I distinctly remember that this error was not encountered by my previous...

View Article

codeblocks can't find my compiler

OK, so I downloaded Codeblocks and I already have a cygwin terminal on my computer that I regularly use to compile and run C programs, but when I try to build a program in CodeBlocks, it gives me an...

View Article

Why do the following two code snippets result in different compilation output...

This question is about why it seems that MSVC fails a very basic optimization with which gcc has no struggle. I'm wondering whether I missed something here and what the reason could be.The following...

View Article


Image may be NSFW.
Clik here to view.

How to build/compile object from a folder by using Makefile?

I am trying to create an executable and objects from makefile. Objects and sources are in different folder. My tree is :./obj ./src/main.cpp Makefile All i want is just to make objects in obj/ folder...

View Article

Error trying to use pthread on Ubuntu

I'm reading a tutorial about threads in C++ and tested the following code:#include <iostream> #include <pthread.h> #include <cstdlib> using namespace std; #define NUM_THREADS 5 void...

View Article

RVO on different compilers when using containers

I have the following code on c++17template<typename T> std::vector<T*> getPointerVector(std::vector<T> base) { auto out = std::vector<T*>(); for (auto& t : base) {...

View Article


How to enable instrinsic functions from the preprocessor

I can find the n'th set bit of a 16-bit value by using a lookup table but this can't be done for a 32-bit value, without breaking it up and using several LUTs. This is discussed in How to efficiently...

View Article


GCC attribute no_instrument_function not working

I am trying to add entey/exit hooks to ls in the coreutils package. I followed instuctions from here to get the source and build...

View Article

How to boost.build properly boost 1.72.0 with gcc? b2.exe file not found

I am trying to install boost libraries on my windows 10 computer.These are the steps that I did:I have downloaded the .zip from the official site of boostI have installed gcc/g++ properlyI started...

View Article

CMPLX Yields Undefined Symbol with GCC

I'm trying to hunt down a problem using complex literals when compiling with GCC. Consider the following#include <stdio.h> #include <complex.h> int main(void) { double complex z =...

View Article

18.04 gcc a simple c program

appear functionTest01.c:1:19: fatal error: stdio.h: No such file or directory #include <stdio.h> when i see friends suggestion。sudo apt-get install libc6-dev appearReading package lists... Done...

View Article


OSX Catalina GCC/PIP Issue

I'm trying to install a tool through pip3 onto my Mac but I get the following error: compilation terminated. error: command 'gcc' failed with exit status 1**I've noticed that others have this issue...

View Article

error: command 'gcc' failed with exit status 1 -Python3.7 MacOs Catalina

I was trying to install superset by pip and the error occurs. I've already triedsudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /but I...

View Article


Mac OS: Catalina: unable to execute 'gcc': No such file or directory

MAC OS Catalina(10.15.1) seems to have created some problems for building code that uses gcc. I am trying to build a python application which is running into the following error.Running setup.py...

View Article

GCC: Linking problem with .a Library (-L flag igonred)

i'm struggling for a while with the following issue: I've created a static library file called "libabc.a". The main program and the include files are in different directorys, like /bin and /lib . Now I...

View Article


asm/errno.h: No such file or directory

While building gcc, I get this error:In file included from /usr/include/bits/errno.h:25, from /usr/include/errno.h:36, from ../.././gcc/tsystem.h:96, from ../.././gcc/crtstuff.c:68:...

View Article

unix: Linking shared libraries with gcc on Linux

What is -soname, in shared libraries?gcc -shared -Wl,-soname,libmylib.so.1 \ -o libmylib.so.1.0.1 mylib.o –lc

View Article

Are integers always placed before character array in memory by the gcc compiler?

I am trying a simple buffer overflow in C from HTAOE book . This is the code : #include<stdio.h> #include<string.h> int main(int argc, char *argv[]){ int val0=10; char buffer_two[8],...

View Article
Browsing all 21994 articles
Browse latest View live


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