Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Browsing all 22171 articles
Browse latest View live
↧

ARM64 (Cortex-A53) - GNU Assembler - GIC register: unknown or missing system...

I have started a simple bare-metal application for the Cortex-A53. Now I want implement interrupts, but I run into an issue. Want to read the registers ICC_SRE_ELx to determine the SRE flag, to know if...

View Article


How to use the hidapi library from Signal11?

I installed the hidapi library from Signall11 on my windows10 pc (using minGW). But now I'm having some trouble actually getting it to work with gcc. I have some main.c file in which I include the...

View Article


Mac OS X 32-bit nasm assembly program using main and scanf/printf?

I have spent the entire day trying to get some simple programs compiled but so far very little luck. What I want to do is to compile and run programs written in nasm assembly.I have upgraded to latest...

View Article

C - How to Allocate Memory to string input with variable length?

I have a simple error that I know lies underneath my C code's memory usage, because the iterator in a simple for loop changes drastically after receiving user input on the command line:int i = 1;char...

View Article

Can I tell the compiler that I need to earlyclobber a memory operand?

Consider this program, which can be compiled as either 32-bit or 64-bit:#include <stdio.h>static int f(int x, int y) { __asm__("shrl $4, %0\n\t""movl %1, %%edx\n\t""addl %%edx, %0" : "+r"(x) //...

View Article


why gcc compile readonly single-precision floating-point value as the...

Considering the following example. (CPU: Intel(R) Core(TM) i7-4790, gcc (GCC) 4.8.5 20150623)// file test.c#include <stdio.h>#include <stdlib.h>#include <time.h>int main(){...

View Article

GCC, stringification, and inline GLSL?

I'd like to declare GLSL shader strings inline using macro stringification:#define STRINGIFY(A) #Aconst GLchar* vert = STRINGIFY(#version 120\nattribute vec2 position;void main(){ gl_Position = vec4(...

View Article

Visual Studio error on a static code block while simply works on GCC

How come error echoed by Visual Studio 2017 but not by GCC compiler invalid template argument for 'array', expected compile-time constant expression (compiling source file .. next message note: see...

View Article


How to get a statement in GIMPLE?

I am learning gcc-plugin developments. Now i get a function print_gimple_stmt(stderr, stmt, 0, TDF_SLIM)which can print out the detail of statement, like D.2579 = argc + 100;but i need to find a way to...

View Article


Intrinsics for 128 multiplication and division

In x86_64 I know that the mul and div opp codes support 128 integers by putting the lower 64 bits in the rax and the upper in the rdx registers. I was looking for some sort of intrinsic to do this in...

View Article

Emit DIV instruction, instead of __udivti3

Consider the following code:unsigned long long div(unsigned long long a, unsigned long long b, unsigned long long c) { unsigned __int128 d = (unsigned __int128)a*(unsigned __int128)b; return d/c;}When...

View Article

How to debug C++ program in VSCode with file added

I work fine with debugging without adding a file, however, I do not know how to deal with it with file added.The commands are as follows:g++ -g --std=c++11 lab1.cpp -o lab1./lab1...

View Article

What flags should I pass to objcopy to relocate a PIE (relocatable...

The embedded project I'm working on uses the ld linker flag -pie to create a position-independent executable ELF. As part of the testing, I want to use objcopy to create a binary from the PIE ELF where...

View Article


Why is -L needed when -rpath is used?

I find that the -L flag must be given when using -rpath. For instance:gcc -o test test.o -L. -lmylib -Wl,-rpath=.Why is the -L flag needed? What information more than the information from the h-files...

View Article

C++ program does nothing but Valgrind shows memory alloc

I was toying around with Valgrind, when I noticed something weird: my C++ program does nothing, yet there is 1 memory alloc and 1 free.My simple program:int main() { return 0;}when compiled with g++...

View Article


Unable to link shared libraries in Visual Studio Cross Platform project

Wanted to take advantage of Visual Studio Cross Platform programming capabilities to ease a bit of development work.I have a project in C++ which uses Boost libraries, it compiles and runs fine on...

View Article

How to include "matlabengine.hpp" and "MatlabDataArray.hpp" files in gcc's...

I have a file named call_mat.cpp with two statements at its beginning:\#include "MatlabDataArray.hpp" and \#include "MatlabEngine.hpp"These headers files are not on "gcc" default search path. They are...

View Article


what is mean by machine level code and how to view it?

We know machine level code are in form of 0,1 (binary). Now, in c programming using gcc for a program if cmd is -gcc -c ok.cwhere ok.c is a simple program to print "hi" in c.Now, a file ok.o is created...

View Article

Saftey Critical Applications

I am trying to find tools that are used in critical safety systems be it aerospace, medical anything but specifically that uses GCC/LLVM Can someone give a list of critical safety applications that...

View Article

gcc library in different location of the executable, at runtime?

I wrote a C application which uses some python code:#include <Python.h>int main() { .... Py_Initialize(); PyRun_SimpleString("print('Hello World from Embedded Python!!!')"); Py_Finalize();...

View Article
Browsing all 22171 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>