How to do time profiling of a C program in HP-UX?
I want to do a time-based profiling of an application written in C on HP-UX. I want to see which function is taking maximum amount of time, slowing down the operational duration. Is there a way to do...
View ArticleAre there any performance test results for usage of likely/unlikely hints?
gcc features likely/unlikely hints that help the compiler to generate machine code with better branch prediction.Is there any data on how proper usage or failure to use those hints affects performance...
View Articleavr-gcc version: won't update from 5.4 to 9.2
I am trying to run compile some arduino code in my linux terminal and keep coming up with a problem, and I believe the issue is my avr-gcc version - when I run avr-gcc --versionI get this:avr-gcc (GCC)...
View Articleundefined reference to `sqrt' and using -lm and math.h [duplicate]
I'm using gcc and running the following command cc -Wall -Wextra -pedantic -lm secondDegreeFormula.c -o secondDegreeFormula.I have included math.h and have put the flag -lm. Why does it happen?
View ArticleHow to Install gcc 5.3 with yum on CentOS 7.2?
I am using CentOS 7.2When I use yum groupinstall "Development Tools", gcc version is 4.8.5, like this: I would like to install gcc 5.3How to approach this with yum?
View ArticleHaving problems running make, gcc and arm gcc inside a windows docker...
So I am trying to run a toolchain inside a windows docker container for compiling code for ARM.The docker container is running in a pipeline on Azure pipelines.When I run the container locally in...
View Articlefatal error: Python.h: No such file or directory
I am trying to build a shared library using a C extension file but first I have to generate the output file using the command below:gcc -Wall utilsmodule.c -o UtilcAfter executing the command, I get...
View ArticleWhat's the point of providing input and output operands if they are not...
I found the following piece of code in u-boot/arch/arm/lib/semihosting.c that uses bkpt and other instructions and provides input and output operands even though they are not specified in the ASM...
View ArticleTrouble setting up Boost library with GCC-6 in Clion
I am not able to build a simple Hello World program in GCC-6 but it works fine with Clang in Clion.Now I try to build and run the first example of Boost Date Time hereBoost Date time ExampleMy CMake...
View Articlethe difference between g++ and gcc [duplicate]
I just have a simple c main program and have a class, VoronoiDiagramGenerator.cpp and VoronoiDiagramGenerator.h is the class definition, in main function call the class method. Why I use the gcc and...
View ArticleCompiling C code on Mac/Windows to run on Linux [duplicate]
So I am trying to take a C file/project on my mac book air and compile it so that it produces a static executable that can run on a Linux x86 platform. Is there a way to compile it for Linux while on...
View ArticleSegfault caused by Mix_VolumeChunk (SDL_mixer)
I've a bit of experience with the SDL lib, but for my new project I need to play some sound in my program so I decided to use SDL-mixer. At first glance it works fine when I'm using Mix_Music pointer,...
View ArticleIs there a way to tell bitbake that some DEPENDS is already available
I am trying to cross-compile using bitbake, and some of the DEPENDS are already available in sysroot.Which i have provided in one of the .inc files TARGET_SYSROOT = "/path/to/my/sysroot" #has...
View ArticleIs it possible to use a different gcc version inside a Conda environment?
I have to install a package (spatial-correlation-sampler) which calls for gcc: >=5.3. On my system (Linux, remote server), gcc version is 4.8.5, and a Conda virtual environment uses the same...
View Articlemips-linux-gun-as and mips-linux-gnu-ld compile mips failed
I use the mips-linux-gnu-as and mips-linux-gun-ld compile the mips assembly code! The code is here!.data message: .asciiz "Hi, everybody.\nMy name is Alchemist.\n".text main: jal displayMessage addi...
View ArticleWhen is the gcc flag -nostartfiles used?
I can't seem to figure out the purpose of the flag -nostartfiles. It prevents main() from being called immediately, and typically you'd also specify the program entry point. However, why would I want...
View ArticleHow can I port a CMakeList file more elegantly when converting it from Linux...
I compiled a c++ program with cmake and gcc on Ubuntu based on the following CMakeLists.txt file:cmake_minimum_required(VERSION 3.0 FATAL_ERROR)project(CVLibrary)set(LIBRARY_TARGET_NAME...
View ArticleI wrote x86-64 Assembly. But it's not working under Windows, only on...
I wrote a x86-64 code in Assembly Language. The output is 17. .text.LC0: .string "%d\n"printint: pushq %rbp movq %rsp, %rbp subq $16, %rsp movl %edi, -4(%rbp) movl -4(%rbp), %eax movl %eax, %esi leaq...
View ArticleGCC plugin compilation issue
I'm trying to cross-compile a custom kernel module (from this git),which depends on a plugin that is originally compiled within the git (it's in $git/buildtools/gcc-nexmon-plugin/nexmon.c).Originally,...
View ArticleVS Code will not build c++ programs with multiple .ccp source files
Note that I'm using VS Code on Ubuntu 17.10 and using the GCC Compiler.I'm having trouble building a simple program which makes use of additional .ccp files. I'm probably missing something obvious here...
View Article