GDB won't load source file
I'm using arm-linux-gcc to compile a simple C file at host (debian i386) with -g.Then copy the a.out file to the target (arm,uclibc) computer.Run the a.out– it's just ok.Use GDB (target) gdb a.out and...
View Articlecompilation error on clock_gettime and CLOCK_MONOTONIC
I'm using clock_gettime in a program. I've tried including as well as but neither works. I have also added -lrt to my compiler arguments but still I get the same errors.This is onCentOS Linux release...
View ArticleHow to compile OpenMP C program in OSX with Clang [duplicate]
This question already has an answer here:How can I install openMP on my new MacBook Pro (with Mac OS Catalina)? 1 answerI am trying to compile the following code to calculate the distances of n...
View ArticleAttribute to set function symbol
In Clang and GCC, compiling C or C++, what attribute(s) can I use to override the ELF symbol generated for a function declaration?
View ArticleHow to disable compiler optimizations in gcc?
I am trying to learn assembly language. I have searched and found how to disassemble a .c file but I think it produces some optimized version of the program. Is there any way so that I can see the...
View ArticleCan GCC for ARM flag this as a warning: A != B;
Recently, I was doing a review of some of my code and I found two instances where I mistakenly typed != instead of |=.I was of the opinion that GCC might issue a warning for a non-executable...
View ArticleUnable to build static lib of mesa (libGL.a)
Trying to build a static library of libGL. Looking at "meson configure", it states that static libraries are default. Still, I only end up with a libGL.so file. Is the any magic voodoo to get the...
View Articlegcc via homebrew has no --without-multilib option
I want to install xgboost in Python 3.5. This requires gcc to support -fopenmp option. Default gcc does not support it. So I am using brew install gcc --without-multilib But I get Warning: gcc: this...
View ArticleCan't link COFF object to wine
So I've a healthy COFF binary that links well on windows - my target is to link it on linux using wine as well.ld -melf_i386 /ntfs/traod_p4.bak.obj -o ~/traod *all dll.so files in my lib wine folder*...
View ArticleChange the name of gmon.out file when compiling with -pg [duplicate]
This question already has an answer here:Any way to specify the location of profile data 4 answersIs it possible to change the default name of the file gmon.out, which is created when the profile flag...
View Articleundefined symbol: _ZTIN10tensorflow8OpKernelE in building a library
Trying to build roi-pooling and so file is able to be produced. The issue is when run the sample program.File "roi_pooling_test.py", line 3, in <module> from roi_pooling_ops import roi_pooling...
View Articlewxwidget wxRichTextCtrl compiled results in ld: symbol(s) not found
I am on MacOS Mojave 10.14. I can compile wxWidget code and have compiled a few demos, etc. The only feature of wxWidget I cannot compile is a wxRichTextCtrl. Whenever I do the following in my main.cpp...
View Articlewhy is c++ std::max_element so slow?
I need to find the max element in the vector so I'm using std::max_element, but I've found that it's a very slow function, so I wrote my own version and manage to get x3 better performance, here is the...
View ArticleClang + ARM64: how to pass X8 as an argument? [duplicate]
This question already has an answer here:What prevents the usage of a function argument as hidden pointer? 3 answersIn the ARM64 architecture, if the size of the result exceeds 16 bytes, it is...
View ArticleSPI slave read data into buffer on stm32?
I'm trying to set communication between esp32 (master) and stm32 (slave) over SPI. esp32 is running under micropython and sends four bytes, for example spi.write_readinto(b'\x31\x32\x33\x34',...
View ArticleConstructor SFINAE and inheritence fails in clang
The following code compiles fine under GCC but fails in clang with the error:no matching constructor for initialization of 'Bar'The problem seems to be that clang thinks the template constructor of Foo...
View Articlemulti-word addition using the carry flag
GCC has 128-bit integers. Using these I can get the compiler to use the mul (or imul with only one operand) instructions. For exampleuint64_t x,y; unsigned __int128 z = (unsigned __int128)x*y; produces...
View ArticleHow do I add an icon to a mingw-gcc compiled executable?
In Windows, using mingw's gcc, is there anyway to specify that the output exe file is to take an icon file, so that the exe file shows with that icon in explorer?
View ArticleHow to compile C++ code using modules-ts and gcc (experimental)?
I've been trying to code something using the new experimental feature "modules-ts" that will be included in c++20. I've cloned the gcc branch (found here: https://gcc.gnu.org/wiki/cxx-modules), and I'm...
View ArticleAutomake condition in configure.ac by gcc version
I would like to add flags using automake to the configure.ac file so that I can change the flag package depending on the version of gcc on host. I tried to do that:configure.ac (I enter the following...
View Article