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

MSVC FP library float erfcf(x) unexpectedly slow - 2x slower than double...

Can someone please verify that the slowness that I see with the MS library implementation of erfcf(x) is reproducible elsewhere. It might just be a benchmarking quirk. Also any suggestions for command...

View Article


How can you make a C compiler assume decimal literals (e.g. 1.23) are float...

In my source code, if I write 1.23 as a literal, e.g. doThis(1.23), gcc assumes it's a double.Rather than type doThis((float) 1.23), is there a way to use floats for decimal literals/constants unless...

View Article


Why does exporting a module (C++20) lead to it being undefined? [closed]

I am using CLion (CMake 3.28.1) with gcc compiler version 14 and ninja version 13.2All I am trying to do is create a simple module - just to test it for a larger project. But whatever I try to do, it...

View Article

linker claims library not found, strace shows it try to access valid path though

I am trying to cross-compile something for Android, so I am using a separate toolchain. There is a library that the linker is complaining it cannot find:arm-eabi-gcc: fatal error: -fuse-linker-plugin,...

View Article

can you link D object files with C object files?

Let's say I have two source files, one written in the D programming language and the other one written in the C programming language. I both just compile them, the D source with the DMD (Digital Mars...

View Article


GCC on Windows: Using Address Sanitizer

I'm using WinLibs standalone build of GCC and MinGW-w64 for Windows.When I add -fsanitize=address compiler option, I get a linker error for asan library.Here is the command line which I'm using to...

View Article

Installing the latest GCC and Clang from WinLib causes a missing dll error

I found that for some strange reason, installing the latest WinLib binaries causes clang to not work (version "GCC 14.1.0 (with POSIX threads) + LLVM/Clang/LLD/LLDB 18.1.5 + MinGW-w64 11.0.1 (UCRT) -...

View Article

Build gcc on Windows with another gcc version

How to compile the newest gcc release under Windows 10? I have the latest mingw-w64available here which isn't fully c++17 compliant (I cannot use the filesystem library). A build called winlibs is also...

View Article


Can't run C code when using top right button in vscode, it runs by clicking...

I am learning C from w3schools and Bro Code on YouTube. I wrote exactly the same code as he did but encountered the...

View Article


How to link GCC for GROMACS on cluster?

Recently I have installed gromacs on the master node of my newly installed cluster. As the major requirement of the gromacs is GCC, OpenMPI and gmx_mpi, after compiling everything on the master node, I...

View Article

Compile contents of clipboard

How can i compile the contents of the clipboard, i tried piping the contents pbpaste | gcc but it did not work it gave the error i686-apple-darwin11-llvm-gcc-4.2: no input files I have heard that i can...

View Article

Infering the source line number from C++ core dump

I have a stripped down linux system for which i have to cross compile all the applications i need, on another system. These applications core often and the only information i get from it is the...

View Article

what's the different between -mtune=i486 and -arch=i486

I have an old code need compiled with -m486 flag in GCC. But there is no that flag. Then I found -mtune=i486 and -arch=i486I have read this page.But still don't know which is the best one for -m486?

View Article


How do I write command line arguments into a file in C without writing...

I need to output the arguments passed to a program into a file. Every time I do it, it outputs (null) at the end of every line.This is what I have got:#include <stdio.h>int main(int argc, char...

View Article

Issues with Link Time Optimization (LTO) on avr-gcc with ATmega328

I’m working on a project with an ATmega328 and using avr-gcc/g++. I'm trying to enable Link Time Optimization (LTO), but I’m encountering issues during linking.Here's a simplified example:• Static...

View Article


Image may be NSFW.
Clik here to view.

Undefined symbol in native NodeJS module

I'm building a native C++ nodejs module. I have developed it in windows and now I want to run it on linux. The compiler finishes successfully. But when I runrequire('smartparser'), I'm getting the...

View Article

the result of linking two strong function symbol with the same function...

I am confused about the linking procedure when linking two same function symbol.point.h:#ifndef _POINT_H_#define _POINT_H_struct dpoint_t{ /* data */ double x, y;};struct ipoint_t{ /* data */ int x,...

View Article


Image may be NSFW.
Clik here to view.

how to compile MinGW32 for C-SKY processors?

for C-SKY processors there is an IDE CDS for Windows, it uses MinGW, but it has a very old version of GCC 6.3, I would like to update to 13.2, how to do this correctly?I tried to google and didn't find...

View Article

Function signatures in export file (*.h) using bool return type

I have a file:// mylib.c// -------#include <stdbool.h>bool is_zero(int n){ return (n == 0);}And a file detailing what functions to export:// mylib.h// -------bool is_zero(int n);When I compile, I...

View Article

How to Set Structure Padding and Alignment when Targeting ARM with Clang/GCC...

I am developing a bare-metal application in Rust using bindings generated from C code. My microcontroller is based on the Cortex-M0 core.I compile the C source code using Clang/GCC to generate a .a...

View Article
Browsing all 22042 articles
Browse latest View live


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