./configure with a specified version of g++
How to tell to a 'configure' file to compile with a specified version of g++ ?Thanks.
View ArticleWhy does gcc converts floating point literals to double even after using an f...
This question already has an answer here:Default argument promotions in C function calls 3 answersConsider the following code from C Primer Plus:#include <stdio.h> int main() { float f = 7.0f;...
View ArticleUsing gcov to test a c++ program
I am using gcov for the first time to analyze my program (C++) The program consists of three classes and I have built the project using Code::Blocks. When I am invoking the program using the following...
View ArticleCMAKE_C_COMPILER is not a full path to an existing compiler tool
I recently explored distcc and couldn't make it work. So I sudo apt-get remove distcc After that, I get the error ==> Processing catkin package: 'gencpp' ==> Building with env:...
View ArticleHow to compile GCC on macOS Catalina? [duplicate]
This question already has an answer here:How to get Conda and Virtualenv to work on mac OS Catalina? 8 answersI am trying to compile GCC9 on macOS Catalina. The closest tutorial I've found is this...
View ArticleMissing header files on macOS Catalina [duplicate]
This question already has an answer here:How to get Conda and Virtualenv to work on mac OS Catalina? 8 answersI am having issues with header files on macOS Catalina. I get command-line tool errors like...
View Articlepython module 'signal' has no attribute 'SIGHUP'
C02TPARXG8WN:fal$ python Python 3.6.9 (default, Nov 10 2019, 01:00:31) [GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.10.44.4)] on darwin Type "help", "copyright", "credits" or "license" for more...
View ArticleCompile c++ code with inline-assembly & Intel syntax with gcc and implement it
I'm trying to implement c++ program which read string from c++ part of program, process it with inline assembly (convert all latin symbols to their HEX representation by number in ASCII table) and...
View ArticleCan't manage to set up environment and path to libraries under Visual studio...
After having installed the MongoDB drivers for c++ following this tutorial, I wrote a little bit of code that I managed to compile and run with the command:c++ --std=c++11 main.cpp -o app $(pkg-config...
View ArticleHow to specify register constraints on the Intel x86_64 register r8 to r15 in...
Here's the list of register loading codes:a eax b ebx c ecx d edx S esi D edi I constant value (0 to 31) q,r dynamically allocated register (see below) g eax, ebx, ecx, edx or variable in memory A eax...
View ArticleClass with a pointer to base class containing virtual method
This is a simple program to calculate a worker's salary based on contract type. In class worker I have a pointer to Contract. I declare in main whether it points to contract1 or contract2. But my...
View ArticleDoes someone know a C compiler which does not rely on gcc? [closed]
I am trying to see if my code is portable among many compilers other than GCC and absolutely other than compiler that accept the GNU C dialects, because I am using a lot of extensions and attributes....
View Articlestrcat() has a problem in xcode using gcc
if I compile with XCode at the height of strcat() the following error is returned:Thread 1: EXC_BAD_INSTRUCTION (code = EXC_I386_INVOP, subcode = 0x0) while, if I compile from terminal (gcc -Wall...
View ArticleWhy is this cpu going a lot faster?
i wrote a c program, run at Intel i5-7500(kubuntu with virtualbox run at win10) and Intel Xeon E5-26xx v4(tenxun cloud). i think Intel i5-7500 will be faster(CPU MHz:3.4GHz), but Intel Xeon E5-26xx...
View ArticleUnrecognised emulation mode: i386pep when linking x64 asm on Windows 10
I've tried to compile a "hello world" assembly program using nasm and gcc. I was able to run it succesfully using 32bit assemblation and linking:nasm -fwin32 hello.asm gcc hello.obj However, when...
View Articlegcc -Og flag is optimizing out variables set by inline calls [duplicate]
This question already has an answer here:Variables optimized out with g++ and the -Og option 1 answerOur project just started to use the -Og flag when compiling the software in debug mode vs. the -g3...
View Articlehow do I eliminate linker error mingw32/bin/ld.exe: cannot find -lSDL
I am trying to build SDL for use with Eclipse. I am trying to remove this linker error:Beginning Compilation21:15:53 **** Incremental Build of configuration Debug for project CMD **** Info: Internal...
View ArticleC, Getting errors in symbolic constant definitions (possibly in function...
I have been getting this error in a C program that I'm writing:progra10.c:48:25: error: expected ‘;’, ‘,’ or ‘)’ before numeric constant #define LAST_INDEX ARRAY_SIZE - 1 and program10.c:47:25: error:...
View ArticleExecuting performance gap between GCC and Clang
I have the following simple code and when I compiling them in GCC and Clang there is a huge performance difference between theirs execute times as you can see the results and the versions of the...
View ArticleDisable GCC "may be used uninitialized" on a particular variable
I'm getting this warning on a stack variable:warning: object.member may be used uninitialized in this function In this case I do not wish to force initialization to just to get rid of the warning as it...
View Article