C++ syntax for explicit specialization of a template function in a template...
I have code which works in VC9 (Microsoft Visual C++ 2008 SP1) but not in GCC 4.2 (on Mac):struct tag {};template< typename T >struct C{ template< typename Tag > void f( T ); // declaration...
View Article"program_invocation_name" not compiled under MacOS
Trying to print the program name using program_invocation_name#include <stdio.h>#define _GNU_SOURCE#include <errno.h>#include <stdlib.h>int main(int argc, char *argv[]){ extern char...
View ArticleHow to remove gcc 7.3 from RHEL 7?
RHEL 7 comes with built-in gcc of version 4.8. If I do yum remove gccthen it removes gcc 4.8. How can I remove gcc 7.3 from the system completely?I have tried to find the solution for the above problem...
View Articlecc1plus.exe gets stuck when CI build is cancelled
I frequently get errors likewarning: failed to remove Build/x86-vxworks-kernel-gcc-Release-Ninja: Permission deniedin my CI build. Investigating the build server, I see it is always cc1plus.exe stuck...
View ArticleMakefile can I execute a configuration only once?
Im trying to create a Makefile which compiles some files and creates some outputs but first I want it to execute the configuration only one time and the next time I type make it wont re-execute the...
View Articlegcc versions later are not supported
everyone. I just set up a Ubuntu.I'm trying to turn the yolo of darknet. and I've got this error./usr/local/cuda/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions...
View ArticleCython compile in windows 10 using python3.6
I am moving from Linux to Windows, and try to use Cython with Python3.6. I tried every tutorial in the internet from installing MingW32 and compile to install Visual C++ Compiler. Always face error...
View ArticleWhat makes the difference between direct and indirect access to volatile...
I am dealing with hardware registers on an STM32 controller.I have defined a bunch of structures like the following:#define PACKED __attribute__ ((packed))#define ASSERT(cond) _Static_assert(cond,...
View ArticleIs there a possibility to get source code of ELF file using debug_info?
I have a file with type: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), with debug_info, not stripped. Is there a way to get source code of this file? How can I use debug_info?
View ArticleDPDK GCC :error: array subscript is above array bounds [-Werror=array-bounds]...
when i install dpdk into my Debian servermake install T=x86_64-native-linux-gccthere will be an error:error: array subscript is above array bounds [-Werror=array-bounds] rte_mov32((uint8_t *)dst + 2 *...
View ArticleUnable to interpret control operator in linux
I have the following C program saved in a file named 1.c#include<stdio.h> void main() { printf("Hello World");}After compiling it, I try to execute it using ./a.out || echo HiI expect to see the...
View ArticleHow to deploy a shared library?
I would like to "quickly" deploy a shared library on my Ubuntu. It is for a short term project so I don't want to use auto-tools here, but do everything manually.So I built my library with this:%.o:...
View ArticleCommand that helps link programs?
Sorry if this title is confusing I'm not exactly sure how to word this, I wrote these two C programs explained here successfully:but when I go to test them like my professor told us to I get readin:...
View ArticleIs it possible to write a _Static_assert in GCC/GNU C that would verify the...
Suppose that I have the following definitions:#include <stdbool.h>#include <stdint.h>#define ASSERT(cond) _Static_assert(cond, #cond)typedef union { struct { bool bit0:1; bool bit1:1; bool...
View ArticleWinhttp.h error during compile process: 'WinHttpOpen' was not declared in...
I try figure out, why gcc/g++ compiler throw error likie this:.\http.cpp: In function 'int main()':.\http.cpp:14:5: error: 'WinHttpOpen' was not declared in this scope WinHttpOpen( L"A WinHTTP Example...
View ArticleIs it possible to wrap a dynamic object in an ELF dynamically linked binary?
I am attempting to wrap a glibc symbol with my own definition of that symbol. For functions that glibc exposes this has so far been as easy as defining a __wrap_function_name in my source code and then...
View Article"gcc is not recognized" even after setting PATH variable. What is left?
I had the same problem as in this question: After installing minGW, gcc command is not recognized.I have downloaded MinGW Installer and have followed the instruction that is held in this link and in...
View Articlegcc compiler with visual studio code
0i am doing a project for the school. I have downloaded visual studio code and also i have installed mingw64, also i have added the path to the system.when i try to execute gcc from command prompt...
View ArticleGCC not using SSE intrinsics in compiled code [duplicate]
I'm doing some testing to see what the fastest way of computing the dot product of two vectors is for me, and if I can find a way that's faster than simply a.x * b.x + a.y * b.y + a.z * b.z. I've been...
View ArticleCompile with c++17 mac
I can't compile with -std=c++17, I got :error: invalid value 'c++17' in '-std=c++17'However I update Xcode and clang. My Clang version is:Configured with:...
View Article