arm-GCC to compile asm file
I am trying to compile a simple "asm" file with GCC to understand the compilation. test.h:#define APPLICATION_EXIT .end test.asm:#include "test.h" APPLICATION_EXIT when I run...
View Article"C:/MinGW/bin/gcc.exe" is not able to compile a simple test program" with...
I'm trying to build ParaView superbuild in Windows 10. My stepsOpen VS2015 x86 x64 Cross Tools Command Prompt and execute cmake-gui.Change CMAKE_BUILD_TYPE from debug to releaseEnable:...
View ArticleInstall 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 ArticleHow to not use -wrap for all linked libraries?
My program uses several precompiled static libraries. I wrap malloc and free, but I want one of linked libraries to use 'real' malloc and free. As I run:gcc [...] -W1, --wrap=malloc -W1, --wrap=free...
View ArticleCompiler improperly includes files in same directory
first time using stack overflow. I am attempting to practice Object oriented abstraction and interfaces. I have been unable to get the program to compile, my program is as below.main.cpp#include...
View ArticlePrinting Heap Memory Addresses using GDB
I have this code from the web that I want to test to play with the heap to understand how it stores the addresses. #include <stdlib.h> #include <unistd.h> #include <string.h> #include...
View ArticleWhy would one use #include_next in a project?
To quote the iOS Documentation on Wrapper Headers:#include_next does not distinguish between <file> and "file" inclusion, nor does it check that the file you specify has the same name as the...
View ArticleSegementation fault after printf
I am currently writing a simple program in C as a learning exrcise. Unfortunately, I get segmentation error when I try to write out measured times to file. I have no idea what can cause that. I tried...
View ArticleHow to print 64-bit integer in GCC 4.4.1?
I am using Code::Blocks with GCC 4.4.1 and I seem to be unable to print 64-bit signed integers from my C-code.This code:long long longint; longint = 0x1BCDEFABCDEFCDEF; /* 2003520930423229935 */...
View Articlecortex m - newlib-nano - time functions (HEAP USAGE)
i work on a cortex m system (GCC+newlib-nano (-specs=nano.specs)).there i use - gmtime - mktime - localtimei face the following issues:A.) gmtime uses malloc to allocate some ram, but never ever free...
View Articlegcc on Windows: generated "a.exe" file vanishes
I'm using GCC version 4.7.1, but I've also tried this on GCC 4.8. Here is the code I'm trying to compile:#include <stdio.h> void print(int amount) { int i; for (i = 0; i < 5; i++) {...
View Article= width of type" seems to happen too late [duplicate]">"warning: left shift count >= width of type" seems to happen too late...
Take the following code snippet:#include <stdio.h> #include <stdint.h> void decodeStatus(uint8_t d) { uint64_t a = d << 31; uint64_t b = d << 32; } When shifting an uint8_t...
View Articlesymbol without any name and completed.7392 symbol in .bss section
In my sample C program, compiled with gcc, .bss section has an index [24], as shown by readelf -S. When I try to see the things stored in .bss, by running readelf -s ./pointer | grep 24, I get Num:...
View ArticleChecking the gcc version in a Makefile?
I would like to use some gcc warning switchs that aren't available in older gcc versions (eg. -Wtype-limits).Is there an easy way to check the gcc version and only add those extra options if a recent...
View ArticleHow could i solve libstdc++ portability problem
I have built a binary that runs in my system(fedora 30), but when I want to run that on ubuntu I got below error:/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required...
View ArticleVariadic template error: 'In instantiation of' (gcc 9.2)
I'm learning about variadic template on c++17 on the Jason Turner's youtube channel then I copy his example code (shown below). In his video he uses the site godbolt.org with the gcc 7.#include...
View Articlegcc ASAN doesn't stop on purported runtime error
I would like address sanitizer to abort when it catches something. I thought it was designed to do that by default but it does not seem to be working for me. I also tried ASAN_OPTIONS=halt_on_error=1...
View ArticleWhat happened to std::atomic::value_type?
According to this reference manualFor every std::atomic<X> (whether or not specialized), std::atomic<X>::value_type is X. But if I try using such type I get a compilation error.I've tried...
View ArticleHow can I optimize my project for the linker in C++ Qt?
I have a project that currently exists of a static library, an executable and a test executable. The two executables link to the static library. The static library contains almost all C++ and header...
View ArticleComparing elements of two vectors failed [closed]
I am comparing the elements of the two vectors. Locally the comparison is successful. But when I am doing the same in the server, the result is that the vectors are not matched. Is it a problem with...
View Article