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

GCC error with -mcpu32 flag, CPU32 compiler needed

I am patching code into my car's ECU. This has a Motorola MC68376 processor, so I'm using the appropriate CPU32 instruction set.I want to continue to write in assembly code so that I can explicitly...

View Article


What is the recommend way to add custom flag (-fsanitize=thread) when...

I am using thread sanitizer to debug my code, and the comment in this answer mentioned to avoid false positive brought by newer C++ features such as std::thread and std::future, I should compile the...

View Article


`ld` error when installing hdp package in R

I am try to install the hdp package by Nicola Robers using the following command in R:devtools::install_github("nicolaroberts/hdp", build_vignettes = TRUE)This used to get compiled and installed fine...

View Article

How to add a default include path for GCC in Linux?

I'd like gcc to include files from $HOME/include in addition to the usual include directories, but there doesn't seem to be an analogue to $LD_LIBRARY_PATH.I know I can just add the include directory...

View Article

Mac freezes when running compiles c application

For a long time I have been trying to compile and run c programs on my MacBook Pro running macOS Catalina, I’ve tried compiling with cc, gcc and clang and the compilation seems to work just fine but...

View Article


How to use a makefile with Gtk

My code is supposed to be divided into client, server, and header files. This is the makefile when it's all in one file -# change application name here (executable output name)TARGET=BugTrack#...

View Article

What is cflags's function?

In this issue, CFLAGS set as path:https://unix.stackexchange.com/questions/149359/what-is-the-correct-syntax-to-add-cflags-and-ldflags-to-configureIn this issue, CFLAGS set as compile option:How to use...

View Article

Image may be NSFW.
Clik here to view.

Why is there no optimization for checking for empty string via "" comparison?

This google-benchmark code checked on Quick Bench, shows that string::empty() runs a lot faster than comparing with an empty-string literal. However, creating a name string of "" actually makes the...

View Article


Configure MinGW-w64 for 32bit and 64bit Executables

I honestly have spent too long Googling this.I would like to setup MinGW-w64 so that I can simply pass the -w32 flag in order to create a 32-bit executable, and leave it as default to create a 64-bit...

View Article


GCC Not Compiling in Linux

I was making a c program that includes conio.h library but because I'm on a Debain Based OS, conio.h library is not there pre-installed so I have to search to internet and download it.After downloading...

View Article

Invert a Eigen::VectorXd and assign to another Eigen::VectorXd

so I stumbled upon this compilation issue with Eigen. I'm using Eigen 3.3.4 and compiling on Linux with gcc 8.4.0. Basically I have a defined class inheriting from Eigen::VectorXd which looks like...

View Article

How to hide 'note: ... ' gcc output for external headers?

I try to compile my testproject with gcc 4.8.5. To exclude a warning messages from third-party code I put all external headers into my header - external.h:#pragma GCC diagnostic push#pragma GCC...

View Article

compile error with open62541 (OPC UA), lwip and freeRTOS on STM32H7

I have working system with lwip and freeRTOS on this bord. I would like to add open62541 implementation of OPC UA with single .c and .h files like described here.I was able to create open62541 .c and...

View Article


Detecting if a sub process finishes in C

Is there a way to have a part of your code running in the background in c while the main program continues and check later on in your main program that if the sub-process is still running. I have tried...

View Article

Source column in perf report shows some [unknown]

For a simple C code like this#include <stdio.h>int main(){ int i = 0; FILE *pf; while (i++<= 1000000) { if ( i%2 == 0 ) { pf = fopen( "myfile.txt", "a" ); fprintf( pf, "%d\n", i ); fclose( pf...

View Article


Where is the header file on Linux? Why can't I find ? [duplicate]

Possible Duplicate:How to implement getch() function of C in Linux?What is the equivalent Linux version of the conio.h header file from MS-DOS?Is there a way to replace its functionality? e.g....

View Article

Is the hash required for immediate values in ARM assembly?

I've been working on reading through some different arm assembly code generated by gcc, and I came across something that I haven't been able to find in the spec.movw r0, #39784movt r0, 1Obviously the...

View Article


Value of -faligned-new in GCC

I had an issue similar to this one gcc over-aligned new support (alignas )so I added -faligned-new compiler flag.This fixed a compiler warning. However, when the compiler is run with --verbose flag, I...

View Article

printf and long double

I am using the latest gcc with Netbeans on Windows. Why doesn't long double work? Is the printf specifier %lf wrong?Code:#include <stdio.h>int main(void){ float aboat = 32000.0; double abet =...

View Article

Which C++ standard library headers invoke a requirement for the -pthread...

If you use C++ threads with the GCC compiler (or perhaps more accurately, with the libstdc++ C++ standard library which ships with GCC) on Linux, you may need to include the -pthread option in your...

View Article
Browsing all 21994 articles
Browse latest View live


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