Add compile time macro
I need to have separate struct variables based on compile time flag.How do I pass a flag during compile time to have struct definition based on that.this is in gcc
View ArticleHow to run (and compile) a C file with arguments with gcc?
I think it's a very simple question but I have less experience with command line. I have an old C program I want to run. It shows the following text:/* This is a stand-alone program intended to...
View ArticleUsing gcc's thread sanitizer yields various errors at startup
I have some weird multithreading bugs, so I wanted to use the gcc thread sanitizer to find them. However, when I compile with -sanitize=thread the resulting binary segfaults immediatly with the...
View ArticleDynamic links of libraries with gcc
Case 1:I had 3 different projects linked like this with gcc :ProjectA.so <--- Dynamic link --- ProjectB.so <--- Dynamic Link --- ProjectC (App)To use B, the C project just had to link B...
View ArticleHow do you package GCC for distribution?
I am making a modified C++ compiler and I have it built and tested locally. However, I would like to be able to package my build for Windows, Linux (Debian), and Mac OSX.All of the instructions I can...
View Articlexcode installed but cannot find macOS_SDK_headers_for_macOS_10.14.pkg
I have an issue with compiling gcc which can be traced back to Catalina having issues with xcode, so I referred to the link here "macOS_SDK_headers_for_macOS_10.14.pkg is incompatible with this version...
View ArticleSteps to compile darwin for arm on ubuntu gcc
Has anyone got the steps to compile darwin libraries on gcc for arm on ubuntu?
View Articleexternal/local_config_mlir/include/mlir/IR/Attributes.h:783:20: internal...
I am trying to build Tensorflow 2.0 on Ubuntu 16.04LTSI get the error with gcc 4.8, gcc 5, gcc 9.2, etc.Here are the version of bazel and gcc:ai) ubuntu@ip-10-0-1-71:~/tensorflow$ bazel --versionbazel...
View ArticleCompiling gcc cross-compiler from msys to mingw: mingw libraries needed
I am trying to compile msys to mingw cross-compiler with accordance with instructions. Part of the compilation goes through until it is time for the x86_64-w64-mingw32/libgcc target. Here is an error i...
View ArticleMake a dynamic library that uses a static library, but uses functions from...
I have a program that has several libraries statically linked to it. It loads dynamic libraries (modules) that use those same libraries.Instead of statically linking the modules, would it be somehow...
View ArticleHow rpath and sys/types.h are related?
After adding "-Wl,-rpath,." into CMAKE_EXE_LINKER_FLAGS next call in CMakeLists started returning false:check_include_file_cxx(sys/types.h HAVE_SYS_TYPES_H) How rpath and sys/types.h are related?
View ArticleHow to decrease the size of generated binaries?
I know that there is an option "-Os" to "Optimize for size", but it has little affect, or even increase the size on some occasion :( strip (or "-s" option) removes debug symbol table, which works fine;...
View Articlex86_64: Is it possible to "in-line substitute" PLT/GOT references?
I'm not sure what a good subject line for this question is, but here we go ...In order to force code locality / compactness for a critical section of code, I'm looking for a way to call a function in...
View ArticleC compiler cannot create executables (installing Cocoapods)
While installing RNPermissions and its dependencies I run into an error. Seems to be a problem with my compiler or the package that is being installed.The error: checking whether the C compiler...
View ArticleHow do I make sure that my default C/C++ compiler is GCC
I'm trying to install Riak from source on macOS (https://docs.riak.com/riak/kv/2.2.3/setup/installing/mac-osx.1.html#installing-from-source). There is a note: Riak will not compile with Clang. Please...
View ArticleAddresses of Thread Local Storage Variables
OK, say that I have __thread int myVar;And I then pass &myVar from one thread to another ... If the data is truly "local", then the TLS storage of 1 thread may not be mapped into the other threads...
View Articlegcc error when writing string to char array
When attempting to assign a character string to the previously defined char flightNumber[MAX], I'm hit with error: assignment makes integer from pointer without a cast [-Werror]which is strange to me...
View ArticleWhy am I getting '"undefined reference to `pigpio_start'" when I see the...
I have a simple c file that looks like this...#include <pigpiod_if2.h>#include <stdio.h>int main(){ int pi = pigpio_start(0, 0); if (pi < 0) { fprintf(stderr, "pigpio initialisation...
View Articleconfused about compile time constants
As I read in the book, the process of gcc is: Pre-Processing, Compiling, Assembling and Linking. There are compile time constants and run time constants. Then I get confused about "Compiling" and...
View ArticleSWIG - wrap external library to python
I am integrating a solution from a vendor which provide me only with a list of C++ header and Static Linked lib (.a)files. The structure of the header files are separated into multiple folder, like...
View Article