OpenCV 32bit available for vs 2019?
I'm doing a project in C++ where I need to combine openCV and Zbar. I download both Zbar en Opencv from there original locations, but zbar is in 32bit, and openCV is in 64 bit.I did find this post on...
View ArticleSimple Struct definition in C for Red Black Tree
I don't use the C language since years and now I need it again. I'm trying to build a Red-Black Tree but I'm stuck at the beginning because I'm missing something about "structs".Take a look to my...
View ArticleHow to disable RBP register optimization in GCC when using -O*?
When I use gcc -O2 to optimize my program, gcc changes the value of register RBP. But I want to keep it as FRAME BASE REGISTER, how to do this?Not the same question as: GCC: Prohibit use of some registers
View ArticleWhat is the meaning of the GCC warning "case label value exceeds maximum...
My code looks like this:char * decode_input(char ch) { switch(ch) { case 'g': return "get"; break; case KEY_F(9): return "quit"; break; default: return "unknown"; break; } } Any clues?
View ArticleHow to write a concept for structured bindings?
While compiling the following (reduced) code:#include <tuple> #include <stdlib.h> template<size_t N> struct tying; template<> struct tying<1> {static auto...
View ArticleWhy does this MakeFile rule have two colons?
$(EXEX) : main% : $(OBJS) pp%.o gcc $(FLAGS) $^ -o $@ I am just trying to understand the above. As I understand it, everything in EXEX are targets which will be built using the following pattern.main,...
View ArticleHow do I list the symbols in a .so file
How do I list the symbols being exported from a .so file? If possible, I'd also like to know their source (e.g. if they are pulled in from a static library).I'm using gcc 4.0.2, if that makes a...
View ArticleWhich directories/files could be removed after I complete the installation of...
I'm building a docker image which is to support gcc compilation on centos. But after I complete the installation of GCC from source on centos, the image expands to almost 6GB. Then my question is,...
View Articleriscv-gcc Fails to build [GCC_NO_EXECUTABLES]
I want to use riscv-gcc to implement an Ibex (RISCV core) example on an Arty-A7 but I haven't been able to build it properly. It's been failing after the 'make' phase. It seems to have something to do...
View ArticleHow to disable RBP frame pointer register optimization in GCC when using -O*?
When I use gcc -O2 to optimize my program, gcc changes the value of register RBP. But I want to keep it as FRAME BASE REGISTER, how to do this?Not the same question as: GCC: Prohibit use of some registers
View Articlemake_pair namespace pollution
In the code I've been writing recently, I've noticed a strange behaviour.When I use make_pair with the first argument being an std::pair, make_pair becomes "magically" available in the namespace (I...
View ArticleVariadic macros with zero arguments
I am working on a call macro,#define CALL(f,...) FN(f)->call((ref(new LinkedList()), __VA_ARGS__)) which when called,CALL(print,2,3,4,5); adds 2 3 4 5 to the linked list (, is overloaded to do so)...
View ArticleC++ generate a warning when a class member shadow a class member of its parent?
Is there a way to generate a warning when a derived class member variable name shadows one of its parents class, e.gclass Mother { public: Mother() : i(0) {} virtual ~Mother() {} protected: int i; };...
View ArticleHow to turn off gcc compiler optimization to enable buffer overflow
I'm working on a homework problem that requires disabling compiler optimization protection for it to work. I'm using gcc 4.4.1 on ubuntu linux, but can't figure out which flags are are the right ones....
View ArticleRunning small C-Program tooks more then 2 minutes?
UPDATE I would like to mention additonaly that the long run is only when i start the a.exe for the first time - when i started it afterwards again it runs without delayWhen i again do a compile - its...
View ArticleWhat is the -fPIE option for position-independent executables in gcc and ld?
How will it change the code, e.g. function calls?
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 a human would write, there are many unrolled loops, extensive use of macros, huge arrays...
View ArticleWhy do you need '-lpthread'?
So my questions is: Why do you need '-lpthread' at the end of a compiling command? Why does this command work: gcc -o name name.c -lpthread but this won't: gcc -o name name.c I am using the pthread.h...
View Articlewhat means about "-DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER" as the flags of...
they seems like startup and standard files of stm32 ,but i can not find them in "GCC offical refeence PDF" .why can they be used directlythis is the flags of arm-none-eabi-gcc in makefile:# specify...
View ArticleWhy GCC 7.4.0, C++ strcmp() function returns different answers on comparing...
This question already has an answer here:strcmp() return different values for same string comparisons 2 answersHere is my code that compares srtings given in array and strings given directly to the...
View Article