how to fix the error: â::max_align_tâ?
I get the error"/usr/include/c++/5/cstddef:51:11: error: â::max_align_tâ has not been declared using ::max_align_t; ^"So I should update the libraries because I find this solution:"A workaround until...
View ArticleCross compile busybox source code using arm-linux-androideabi-gcc crosscompiler
Can anyone please tell how to cross-compile busybox source code with arm-linux-androideabi-gcc cross-compiler.Please provide the busybox source code along with the steps to be followed.I tried to...
View ArticleLinking to stdc++fs with C++20 still necessary when using filesystem?
I began using experimental::filesystem when it had just come out and I was advised to link in stdc++fs using target_link_libraries(MyTarget stdc++fs) in CMake. My programme builds either way but may I...
View ArticleIntel threaded building blocks gcc version
I have installed intel parallel studio. However looking at the gcc compiler in the directory structure of tbb it appears 4.8 is used. I am trying to build another repository that relies on tbb which is...
View ArticleWhat is the difference between MACOSX_DEPLOYMENT_TARGET and...
I often need to target Mac OS X versions that are older than the one I'm currently running. As I prefer to work with a bash shell and Makefiles, I do not use Xcode. Apple explicitly supports targeting...
View ArticleCompiler can't find 'aligned_alloc' function
I'm trying to launch the example code from aligned alloc:#include <cstdio>#include <cstdlib>int main(){ int* p1 = static_cast<int*>(std::malloc(10*sizeof *p1));...
View ArticleNo hash found for gcc-7.4.0.tar.xz in Ubuntu 18.04.4 LTS
I am new in Linux and ubuntu. I'm trying to perform make in ubuntu terminal. But get an error: No hash found for gcc-7.4.0.tar.xz as in screenshot. GCC is installed, and the version is 7.5.0. I'm...
View ArticleDebugging SFINAE in gcc or clang
I would like to know how my template/s are expanded at compile time given a specific invocation, in particular I'm interested in getting to know more about all the possible use and behaviours of the...
View ArticleDo we have C++20 ranges library in GCC 9?
Do we have support for C++20 ranges library in the newly released GCC 9?I copied the example code below for ranges library from: https://en.cppreference.com/w/cpp/ranges#include <vector>#include...
View ArticleIs there a way to "statically" interpose a shared .so (or .o) library into an...
First of all, consider the following case.Below is a program:// test.cppextern "C" void printf(const char*, ...);int main() { printf("Hello");}Below is a library:// ext.cpp (the external...
View ArticleCan I tell the compiler that I need to earlyclobber a memory operand?
Consider this program, which can be compiled as either 32-bit or 64-bit:#include <stdio.h>static int f(int x, int y) { __asm__("shrl $4, %0\n\t""movl %1, %%edx\n\t""addl %%edx, %0" : "+r"(x) //...
View ArticleHow to package gcc executable with all dependencies
I want to package the GCC Compiler as an executable (want to be able to call it like I normally do) with all of its dependencies and send it to a computer where I can't install the compiler. The...
View ArticleUndefined reference to operator new
I'm trying to build a simple unit test executable, using cpputest. I've built the cpputest framework into a static library, and am now trying to link that into an executable. However, I'm tied into a...
View ArticleMissing system headers while installing GCC 9.1.0 on macOS 10.15.5
I'm trying to build GCC from source and have managed to build all the dependencies, however right now I'm struggling with building GCC itself. In macOS 10.15 Apple deprecated the location /usr/include,...
View ArticleIs this explicit linking against OpenMP::OpenMP_CXX still necessary with this...
I am using CMake and GNU's parallel algorithms and the following code snippet in my CMakeLists.txt:if (OPENMP_FOUND) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") set (CMAKE_CXX_FLAGS...
View ArticleMinGW C++ Linker unable to find file due to truncating filename and/or unable...
I'm experiencing a very bizarre linker problem that exhibits in different ways in different scenarios. Unfortunately, I cannot share any source, so this is a little bit of a long shot, but I'm lacking...
View Articleredirecting result of running assembly code in linux to text file [duplicate]
I'm trying to write a Python script to test the output of some various code I've written in assembly against an expected output. However I am having difficulty redirecting the output into a file.I have...
View ArticleWhat is -fverbose-asm trying to say in assembly?
I have compiled this function:void print_ints(int len, ...){ va_list args; va_start(args, len); for(int i =0; i<len ; i++) { int val = va_arg(args,int); printf("i:%i\tval:%i\n",i,val); }...
View ArticleHow can I include GCC headers in a Visual Studio program; are there any extra...
I'm a bit of a novice programmer - apologies if I'm missing anything obvious here.Recently, I've wanted to play around with high-precision floats - specifically of the 128-bit quad-precision kind.I...
View ArticleHow do I tell CMake to specify multiple linker script files to GCC?
I"m using CMake 3.17 and the GNU ARM toolchain and I'm trying to migrate a build from Eclipse to CMake. Part of the Eclipse build specifies multiple linker script files to use at link time so I set up...
View Article