Quantcast
Browsing all 22052 articles
Browse latest View live

Correctly declaring nested template structs. How to? [duplicate]

So, here is a snippet of the code that I believe is enough to illustrate the problem, the nested templated structs:namespace util { // Adapted from https://stackoverflow.com/a/28352296/7332177:...

View Article


How to handle lib dependency while compiling?

Let's say that I have two static libraries : libA and libB and that libB uses libA.For each library libX let's say that hX is libX's headers's directory and dX is libX's file's directory.Now what...

View Article


Const overload unexpectedly called in gcc. Compiler bug or compatibility fix?

We have a much larger application that relies on template overloading of char and const char arrays. In gcc 7.5, clang, and visual studio, the code below prints "NON-CONST" for all cases. However, for...

View Article

Conan cannot find a certain package for the specified settings, options and...

I am working on a small C executable project using Jetbrains CLion 2019.3, MinGW 8.1, and also the Conan C/C++ Package Manager 1.21.1. I am refreshing my knowledge about C and want to learn about new...

View Article

MinGW exe cleaning

Why I'm getting these strange things inside my compiled executable?libgcj-16.dll._Jv_RegisterClasses... @.Mingw runtime failure:.. VirtualQuery failed for %d bytes at address %p.... Unknown pseudo...

View Article


assemble link programming ground up echo 0

I'm using code here, https://github.com/foomur/programming-ground-up, I'm on a 64 bit pc,i've installed 32 bit libssudo apt-get install gcc-multilibwhat I use to assemble and link:as asm.asm -o asm.o...

View Article

Why different assembling code generated? Which is better?

#include <cstdint> uint64_t hr1(const uint64_t x, const bool a, const int n) noexcept { if (a) { return x | (a << n); } return x; } uint64_t hr2(const uint64_t x, const bool a, const int n)...

View Article

Trying to install pytext, error due to incompatibility of g++ versions

I am trying to use the slot filling model pre-shipped in pytext on MacOS, it initially gave me the error that my g++ version was not compatible so, I went and installed a newer version of gcc/g++ !!...

View Article


Alias for Ubuntu package 'gcc' not found but 'gcc-4.8' found

So I checked in the terminalgcc --versioncommand not foundBut when I check gcc-4.8 --versionit outputs the proper information about this gcc.The question is how can I type gcc --versionand it calls the...

View Article


View the assembly code for C source code through gcc in the terminal [duplicate]

I run gcc -S filename.c or gcc filename.c -s successfully but no output. So how do you view the assembly code itself?

View Article

codeblocks can't find my compiler

OK, so I downloaded Codeblocks and I already have a cygwin terminal on my computer that I regularly use to compile and run C programs, but when I try to build a program in CodeBlocks, it gives me an...

View Article

Building gcc-4.1.2 on Fedora 17 (32-bit) VM

I'm working with some legacy hardware, and I need to compile a customised version of opensslv0.9.8e onto a 32-bit system.My Fedora 17 VM comes with gcc-4.7.2. Unfortunately, compiling the openssl...

View Article

CONFIG GCC on kernel 5.5

i have a problem with GCC PLUGINS on my news kernel. I prepared a custom linux kernel to harden my future compilation, but i cannot activate the following options :CONFIG_GCC_PLUGINS...

View Article


Wrong calculations after GCC vectorization on ARM

There is a simple program that iterates through an array of structures and calculate a sum of difference between its members. The program is compiled for ARM (aarch64) with GCC 9.The problem is the GCC...

View Article

Image may be NSFW.
Clik here to view.

MAC: Qt Cannot detect toolkit

How I can configure QT Project using Qt 5.12.1/Qt Creator 4.8.1 I need compile my project for mac os. I tryed with QT Creator, then, below problem occur.Or compile with below command.qmake make But,...

View Article


Is using canaries for bss or data-sections to detect overflows/smashing useful?

In our GCC-based C embedded system we are using the -ffunction-sections and -fdata-sections options to allow the linker, when linking the final executable, to remove unused (unreferenced) sections....

View Article

Gcc optimizes condition

I have the following code:#include <stdio.h> #include <unistd.h> #include <pthread.h> char condA = 0; volatile int vA = 0; volatile int vB = 0; void* thread_a(void* arg) { while (1) {...

View Article


How can I include CLHEP libraries in standard .cpp files when compiling with...

I installed CLHEP according to the instructions from the README.md file downloaded from http://proj-clhep.web.cern.ch/proj-clhep/. However, when I try to include any of its headers in my standard cpp...

View Article

when g++ static link pthread, cause Segmentation fault, why?

#include <iostream> #include <map> #include <thread> #define SIZE 1024 #define AMOUNT 100000 #define THREADS 4 class A { private: char a[SIZE]; }; void test() { std::cout <<...

View Article

GDB Remote Debugging - Cannot instantiate printer for default visualizer

Setting up remote gdb debugging in eclipse . The debugger will step through the code just fine but, all of the variables show the following error:1) Failed to execute MI command: -var-create - var_Name...

View Article
Browsing all 22052 articles
Browse latest View live


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