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

avx512 is slower than avx2

i have production code that is using avx2 and working well. now i try to use avx512 to speedup the performance. i wrote a small program to test the speed. this test only does some float matrix...

View Article


std::cin not working inside of a for loop [closed]

I'm using mingw on windows. Maybe I'm dumb or it's an error, but cins inside of a for-loop are just not working.This was the best code snippet I could image to demonstrate the problem...#include...

View Article


Linking against older symbol version in a .so file

Using gcc and ld on x86_64 linux I need to link against a newer version of a library (glibc 2.14) but the executable needs to run on a system with an older version (2.5). Since the only incompatible...

View Article

I'm not able to find what is causing the segmentation error in my C++ code

I have a C++ program where I have to rotate the array clockwise according to the given number of elements to be rotated (x). For example if the input array is[1,2,3,4,5]given that 2 elements (denoted...

View Article

Image may be NSFW.
Clik here to view.

${workspaceFolder}\\*.cpp apparently not recognized as a valid path in vscode...

When pressing ctrl+shift+b in my workspace folder, I'm getting The terminal process terminated with exit code 1. That seems to mean the path is incorrect. Yet, I'm following instructions from Microsoft...

View Article


How do I assign values to or modify an extern struct declared in C header file?

I declared 2 termios structs in my header file aba.h:extern struct termios cookedInput, rawInput;And then in a function I tried to changed the values in stdin_prep.c like so:tcgetattr(STDIN_FILENO,...

View Article

Issue installing opencv on raspberry pi 4 with gnu compiler/default c++ library

First post don't eat me up. Just spend 8 hours trying to get this to work. I have raspberry pi 4 with raspbian (updated to latest release) and tried to get opencv. I have python 2.7, all the...

View Article

Error Reading Values in a Array of Structures

struct book{ char name; float price; int pages;};struct book b[4];int i;for(i=0;i<4;i++){ printf("Enter name, price and pages in the book:\n"); scanf("%c %f %d", &b[i].name, &b[i].price,...

View Article


RISC-V Toolchain Error: unknown pseudo-op: `.insn'

I added my own instruction for spike RISC-V like this tutorial. It said that I need to rebuild the toolchain which takes too long for me.So I tried to find out how to use my instruction without rebuild...

View Article


gcc doesn't create a binary file

I'm trying to use a simple Windows API.But my code doesn't create a binary file when I use 'MessageBoxA'. And it doesn't produce any error message.If I don't use 'MessageBoxA', the code creates the...

View Article

Need help determining output of a short C program containing ASM [duplicate]

#include <stdio.h>int main(void){ int var1 = 12; int var2 = 5; asm volatile("mov %3, %0 \n""add %2, %1" : "=r"(var1), "=r"(var2) : "r"(var1), "r"(var2)); /* asm volatile("mov %1, %0 \n""add %0,...

View Article

gcc: error: libgomp.spec: No such file or directory with Amazon Linux 2017.09.1

I'm trying to install the rJava package in R running on an Amazon Lightsail instance (Amazon Linux 2017.09.1). I keep getting an error that gcc can't find libgomp.specI've located the file at...

View Article

How do you package GCC for distribution?

I am making a modified C++ compiler and I have it built and tested locally. However, I would like to be able to package my build for Windows, Linux (Debian), and Mac OSX.All of the instructions I can...

View Article


Image may be NSFW.
Clik here to view.

Gcc compiled executables produces "access denied" message?

I have set path to the gcc inside the dev-c . It compiles fine and creates the executable but it fails to run the program and shows a message box (as shown in the first picture) first and then prints...

View Article

Why does this program cause a segmentation fault? [closed]

Please somebody give me a explanation of how this program cause segmentation fault and how can i exploit it?#include<iostream>using namespace std;void a();void b();void a(){ cout<<"Hello...

View Article


How to know which gcc version to choose when compiling pytorch from source?

I am working on installing PyTorch from source but am unsure about the specific dependency versions to use for the version of PyTorch I want to install. In particular, I noticed performance variations...

View Article

GCC memory leak detection equivalent to Microsoft crtdbg.h?

After many years of working on a general-purpose C++ library using the Microsoft MSVC compiler in Visual Studio, we are now porting it to Linux/Mac OS X (pray for us). I have become accustomed and...

View Article


Compiler error: initializer element is not a compile-time constant [duplicate]

I'm compiling this super simple program written in C:#include <stdio.h>#include <stdlib.h>​int a = 1;int b = a;int main(void) { printf("%d", b); return 0;}and the command I used to compile...

View Article

Identity mapping dosen't work after enabling paging

I try to implement my own OS, and now I try to implement paging mechanism.I created a page directory, and created identity mapping of the kernel code.However, after storing the physical address of the...

View Article

libpthread.so.0: error adding symbols: DSO missing from command line

When I'm compiling openvswitch-1.5.0, I've encountered the following compile error: gcc -Wstrict-prototypes -Wall -Wno-sign-compare -Wpointer-arith -Wdeclaration-after-statement -Wformat-security...

View Article
Browsing all 22000 articles
Browse latest View live


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