on linux c c++ mixing issue from c file called cpp function and global...
I am trying to call c++ function from c on Linux(Centos 6.9) and GCC version is 2.96 and optimization is offon windows, function working perfectly. However, on Linux, address of global variable changed...
View ArticlePlease use compiler that supports __attribute__((constructor))
I just compiled my own version of gcc/9.2.0 using gcc/4.8.2. After successful compilation and installation of gcc/9.2.0 I try compiling ucx-1.5.1. When I try to run the ucx configure script I get the...
View ArticleHow can I suppress a stack-buffer-overflow from AddressSanitizer in gcc
My app is using boost::program_options and it's triggering an AddressSanitizer "stack-buffer-overflow" while generating an error message from an exception.I'm not worried about the boost bug - the...
View ArticleHow does one set up the Visual Studio Code compiler/debugger to GCC?
I am programming in C in Visual Studio Code, but I can't compile, as VSC only offers three compilers built in - Node.js, C# Mono, and Extension development. After a little bit of digging I came across...
View ArticleGetting the gcc linker to place multiple functions at the same address
I have an embedded system with internal and external flash. The controller is an MSP430F22x2, the external flash is connected using SPI. I can load data from external flash but the external flash isn't...
View ArticleIncluding header file in assembly file
I am trying to include a header file containing a macro into my main assembly file, but the compilation fails.Below is my main.S file#include "common.h" BEGIN mov $0x0E40, %ax int $0x10 hlt Below is my...
View ArticleSetting Include Paths When Building Kernel Modules
I'm trying to compile a kernel module for Linux. I have the following files: testuio.c and Makefile. When I type make all I get the following errors:$ make all make -C /lib/modules/`uname -r`/build...
View ArticleCreating my own makefile [Error 255]
I have been enjoying the luxury of coding with an IDE that writes my makefile's for me, Iv decided that I have been 'short cutting' for far to long, so I have read a few manuals and watched a few...
View ArticleHow can I compile GCC natively on Android?
I have been trying to compile GCC natively on Android using a terminal emulator (termux), but since this does not store its binaries in /bin as a normal Linux PC I get the following error:./configure:...
View ArticleStatically built FFMPEG binary segmentation fault
I want to create a custom build of FFMPEG which rips out everything except for the ability to transmux HLS videos to MP4, and I need this build to be 100% static with no external dependenciesI tried...
View ArticleWhat might be the point in putting a variable exactly in the "STACK" section...
In gcc doc one reason is given for using section. This reason is to map to special hardware. But this seems to be not my case. So I have given a task to modify a shared library that we use on our...
View ArticleInclude error when trying to include
Recently I tried to create tool using Windows Update Agent API in C++. The problem is, even include of the wuapi.h header file causes problems on my machine. It keeps saying, the header file could not...
View ArticleAny tips for compiling huge code generated source files?
I am trying to compile generate C code which comes from large Dymola models. The code generated is unlike what one would write, there are many unrolled loops, extensive use of macros, huge arrays which...
View ArticleIs there a way to unhide hidden-visibility symbols with GNU binutils?
I'm working on a script to make uClibc usable on an existing glibc-targetted gcc/binutils toolchain, and the one problem I'm left with is that pthread_cancel needs to dlopenlibgcc_s.so.1. The version...
View Articleundefined reference to `__gxx_personality_sj0`
With gcc 4.6 when trying to execute this code: #include <iostream> using namespace std; #include <bitset> int main() { //Int<> a; long long min =...
View ArticleNo exe file being generated in C using recent Cygwin versions
GCC 4.9.2 does not create an executable, neither a.out or -o hello.exe. Adding -v to the compile line indicates that -o is switched to a non-existent temporary file, for example: -o...
View ArticleStrange behavior of noexcept operator in C++14
I found a strange behavior of the noexcept operator in C++14. The following code compiles well by both gcc and clang (with --std=c++14 option).// test.cpp #include <iostream> #include...
View ArticleStatic library: Mixing debug and release on Linux
It is widely documented, mostly for Windows, that one should never mix a debug and release mode with static library or non ABI libraries in general. Among the reason cited, there is a couple of macro...
View ArticleGCC ARM Performance drop
I stumbled upon very strange issue with GCC. The issue is 25% drop in performance. Here is the story.I have a pice of software which is fp32 compute intensive (neural networks compiled with TVM). I...
View Articlehow come './file' runs c++ program and also bash scripts? [closed]
when I do gcc someFile.cpp -o test and then do ./test(a file which contains strange characters) it runs the program and when I make a bash script file nano test.sh and run it by ./test.sh it runs the...
View Article