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

Get location of libasan from gcc/clang

When I compile with -fsanitize=address, GCC/Clang implicitly make use of an ASAN dynamic library which provides runtime support for ASAN. If your built library is dynamically loaded by another...

View Article


Compiling C code using Intel MKL: ld: unknown option: --no-as-needed

I wrote a C file (template.c) that uses the MKL Intel library (which I've already installed). I'm using this shell script to compile my code (template.c). Assume the C file is minimal - it imports the...

View Article


gcc-arm-linux-gnueabi command not found

I am trying to install the gnu arm toolchain for ubuntu. I first downloaded the tar from CodeSourcery. However when I go into the bin folder, I cannot run any of the binaries. I have tried with ./ and...

View Article

How to correctly compile uClibc++ with musl?

I need to compile c++ code with uClibc++ and musl. To do that, first I must compile uClibc++ agains musl. But trying to do so, I have run to a few errors, like missing __snprintf_chk and...

View Article

Libsodium on macOS, undefined symbols for x86_64

I'm using an Intel Mac running Catalina 10.15.1I'm trying to use libsodium using gcc Apple clang version 11.0.0 (clang-1100.0.33.12)I have both tried to install libsodium via home-brew and manually...

View Article


Why the compiler flags “-mcpu=cortex-m3” goes wrong with stm32f10x?

core of stm32f10x should be cortex-m3,with the flag"-mcpu=cortex-m3"↓(this is section of makefile ):CFLAGS +=...

View Article

Image may be NSFW.
Clik here to view.

what to configure for running threads in eclipse

i know it is a well known problem.i have a simple thread c++ code:#include <string> #include <iostream> #include <thread> using namespace std; // The function we want to execute on...

View Article

Gcc collect2: fatal error: cannot find 'ld'

I'm going through the tutorial on making an OS on http://wiki.osdev.org/Bare_Bones. When I try to link boot.o and kernel.o using this command: i686-elf-gcc -T linker.ld -o myos.bin -ffreestanding -O2...

View Article


int main = 0, is compiled but crashed

I had very simple program as below. int main = 0;This program as a.c file compiled fine with gcc-4.8,gcc-5,gcc-6,gcc-7 and gcc-8 and application crashed when executed. Same program as a.cpp file...

View Article


Mystery: casting a GNU C label pointer to a function pointer, with inline asm...

Firstly: This code is considered to be of pure fun, please do not do anything like this in production. We will not be responsible of any harm caused to you, your company or your reindeer after...

View Article

Does MinGW-w64 support std::thread out of the box when using the Win32...

I have opted for the Win32 threading model when installing the MinGW-w64 toolchain, after reading that it provides better performance than the POSIX counterpart. I am not qualified for benchmarking...

View Article

Why do I get a linker error while I try to compile a C file?

I've had this error for weeks I already made a post about it but it wasn't very clear. So I am calling a function from a a header file myBmpGris.h and the functions are implemented on the file...

View Article

GCC 7, -Wimplicit-fallthrough warnings, and portable way to clear them?

We are catching warnings from GCC 7 for implicit fall through in a switch statement. Previously, we cleared them under Clang (that's the reason for the comment seen below):g++ -DNDEBUG -g2 -O3...

View Article


Alternative to sscanf that makes both Linux and Windows happy

I have a truly ancient punch-card format and a C++ code that reads it using sscanf as follows, sscanf(longstr1,"%2d %5ld %1c %10s %2d %12lf %11lf %7lf %2d %7lf %2d %2d %6ld ",...

View Article

error in compiling: undefined reference to 'nameOfFunction'

I have a project in c and I cannot compile it because of errors. I use CLion editor and compile it there(using the play button). I get the following error: CMakeFiles/GameServer.dir/game.c.o: In...

View Article


Using MinGW gcc to create DLLs for VBA 64 bit

I want to do what the title says. This has been discussed before (How to create dll using gcc compiler/Mingw for visual basic?), but these posts are 10 years old. I was writing Excel/VBA macros at that...

View Article

Compile error while try install mysqlclient package with pip

I have CentOS 7 with installed mariadb, python3.6 and pip for python3.6 I also installed glibc-static and libstdc++-staticI try to install mysqlclient with "pip install mysqlclient"I have this error in...

View Article


I cannot link with gcc-7

I have 3 files: tester.c, knnring_sequential.c, knnring.h.I compile them with the sequence:gcc-7 -c knnring_sequential.c -o knnring_sequential.o ar rcs knnring_sequential.a knnring_sequential.o gcc-7...

View Article

Why does STL function use node's color to calculate std::map node predecessor

I was looking through libstdc++'s implementation of std::map and noticed that iterator increment and decrement functions are not entirely symmetrical. local_Rb_tree_decrement function (aka predecessor)...

View Article

A int[2²⁰] array cause OpenMP Segmentation Fault

I have an int flags[(1<<20)]; array and it seems that there's something wrong, and it causes segmentation fault. Is this a stack overflow problem? How much should I set stack size and how?

View Article
Browsing all 21994 articles
Browse latest View live