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

Error message when building WxWidgets sample program

I was trying to follow the instructions here to setup WxWidgets.I've managed to run the commands wx-config --version and wx-config --list but not the commands to compile the minimal example, which...

View Article


C++ 14 GCC prefers constructor with std::initializer_list instead of...

I encountered some situation that I cannot explain.I succeeded to reproduce the problem in a short example:My class MyObj (originally nlohmann::json) has 2 constructors: move constructor and...

View Article


build boost::iostreams with zlib

I'm trying to build the following code:#include <boost/iostreams/filter/zlib.hpp>#include <iostream>int main(int argc, char* argv[]){ int a = boost::iostreams::zlib::default_compression;...

View Article

why the program is not terminating in gcc? [closed]

Why the program listed below is not terminating. I am using gcc compiler in linux.#include <stdio.h>int main(void){ int c; printf("Enter characters: "); while((c = getchar()) != EOF) putchar(c);...

View Article

Can't link static boost::iostreams library

I build the following code:#include <boost/iostreams/filter/zlib.hpp>#include <iostream>int main(int argc, char* argv[]){ int a = boost::iostreams::zlib::default_compression; std::cout...

View Article


Make errors in Ubuntu WSL

I'm trying to use make to build a static library. This operation is successful if I run it from a virtual machine (using CentOS 7 on VirtualBox) or on one of our company's Linux servers, but I get the...

View Article

vpcmpeqb in inline assembly

Currently I am trying to move from using NASM, to using inline assembly in c, as this would make linking a lot easier in the future (especially with inlining). However, I can't get my vector...

View Article

Why does GCC use multiplication by a strange number in implementing integer...

I've been reading about div and mul assembly operations, and I decided to see them in action by writing a simple program in C:File division.c#include <stdlib.h>#include <stdio.h>int main(){...

View Article


Execut binaries / tests on host that are built by non-host toolchain

Scenario:We would like to build our sources by an external / hermetic toolchain so all includes, libs and tools from the host are ignoredTo do so, a new toolchain is introduced to Bazel-Configuration....

View Article


How can I configure Codeblocks to not close the console after the program has...

I should specify, I do not want to do the waiting for input thing or to use the debugger. I want the program to run and terminate as it normally would, but where the console window doesn't close after...

View Article

Install gccgo for testing Protocol Buffers 3 along with Go

I'm trying to install gccgo for testing Protocol Buffers 3 with Golang...I have to confess that I'm back to dev after 8 years off (and I'm not a native speaker) so, thank you for your indulgence. Thank...

View Article

Write registers data into array using asm C

I created a program that writes registers data into variables using asm. And it seems to be working well. But then I decided to replace variables by an array and to write registers data into an array....

View Article

What are the exceptions for __always_inline and __never_inline in gcc?

Andrei Alexandrescu mentioned in a talk that he presented at cppcon that gcc doesnt always inline when then __always inline macro is defined and used, and vice-versa for __never_inline. I couldn't find...

View Article


Can I tell gcc/g++ to warn on missing header guards?

Whether one uses #ifndefs or #pragma onces, compilers understand guards. And every header file (.h/.hpp) should have a guard. Exceptions perhaps for some .inc files that might be intended to be...

View Article

Executable without dynamic linkker

Can I compile (using g++ compiler) an executable (on linux) and strip out the dynamic linker /lib64/ld-linux-x86-64.so.2 ?I mean that if I ldd the executable after building it should detect the linker...

View Article


How to solve duplicate function problem when linking libraries?

I have executable, that links against library1.so. Library1.so contains a function called json_object().I am trying to enhance library1 where library1.so would link against library2.so. Unfortunately,...

View Article

can't compile OpenFOAM v1912 with intel icc and intelmpi

! UPDATE on 28 Feb, 2020:The problem is solved. please refer to :https://develop.openfoam.com/Development/openfoam/issues/1608SummaryI'm new to OpenFOAM and I'm trying to compile OpenFOAM-v1912 using...

View Article


GCC: GLFW undefined reference to `glfwCreateWindow' [duplicate]

I created the ./hello-glfw folder. and I have an index.c file. Here's what my file looks like#include <GLFW/glfw3.h>int main(void){ GLFWwindow* window; /* Initialize the library */ if...

View Article

gch file generates stray character errors

I'm compiling a small library with the commandg++ cppbase.cpp -c -wand I'm using pre-compiled header cppbase.h.gch. cppbase.cpp looks like this:#include "../inc/cppbase.h.gch"namespace cppbase {...

View Article

Different ways how gcc allocate memory for stack [duplicate]

How does gcc decides how much memory allocate for stack and why does it not decrement %rsp anymore when I remove printf() (or any function call) from my main?1. I noticed when I played around with a...

View Article
Browsing all 22000 articles
Browse latest View live


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