Quantcast
Browsing all 22075 articles
Browse latest View live

can't compile OpenFOAM v1912 with intel icc and intelmpi

SummaryI'm new to OpenFOAM and I'm trying to compile OpenFOAM-v1912 using Icc and IntelMPI, only to find the following confusing error. It seems like an error in codes. But it just makes no sense,...

View Article


Priority of LIBRARY_PATH with custom gcc installations

Is there a way to get compilers to prefer libraries from LIBRARY_PATH instead of system paths. I am particularly looking for Clang. I partially solved the problem for GCC while writing this question,...

View Article


#include causes errors

I'm trying to use GetTickCount() from the windows.h header file. Right now my code looks like this:#include <stdio.h> #include <string.h> #include "declarations.h" #define INPUTBUFFER 400 *...

View Article

fatal error: Python.h: No such file or directory

I am trying to build a shared library using a C extension file but first I have to generate the output file using the command below:gcc -Wall utilsmodule.c -o Utilc After executing the command, I get...

View Article

Linux modbus C library - Cannot link the library modbus.h header file without...

This is the first time I am installing a library from github in a Linux distribution, I successfully installed it but I had some doubts on how this magnificent utilities work. Moreover, I wanted to...

View Article


Undocumented ABI changes of std::function between GCC-4 and GCC-5/6/7/8/9,...

with _GLIBCXX_USE_CXX11_ABI=0 std::function of GCC-4 is different of GCC-5 and follwing versions.The following code show you the fact:==> lib.cc <==#include <functional>...

View Article

GCC: Should undefined behavior of overflows preserve logical consistency?

The following code produces strange things on my system:#include <stdio.h> void f (int x) { int y = x + x; int v = !y; if (x == (1 << 31)) printf ("y: %d, !y: %d\n", y, !y); } int main () {...

View Article

CMake Error : CMakeTestCCompiler.cmake: The C compiler...

while I am trying to compile my C++ code on VisualStudio using an external SDK toolchain file. I am using CMake project for that.While I am trying to compile my program, I had this error :1> [CMake]...

View Article


sys/sendfile.h not found GCC

I am using Mac OS 10.6.7,The gcc compiler was already there when I bought Mac. but when I try to include sys/sendfile.h #include<sys/sendfile.h>it throws an errorsys/sendfile.h: No such file or...

View Article


Create shared library with undefined reference using gcc, Unix/Windows...

I want to build a simple library with some undefined reference, as you can see in function_two.c, I call three() which is not defined.header.hvoid one(); void two(); void three();...

View Article

undefined reference to '__GLOBAL_OFFSET_TABLE'

I have added -fno-pie in the CFLAGS, but it still shows this error:ld -melf_i386 -T linker.ld -o kernel.bin start.o kernel.o console.o utils.o kernel.o: In function `_main': kernel.C:(.text+0x16):...

View Article

Is it possible for C/C++ preprocessor to detect some compiler options?

I have a function withstatic int include[MAX_NODE_NUMBER][MAX_NODE_NUMBER][MAX_NODE_NUMBER*MAX_NODE_NUMBER]; static bool...

View Article

gcc behavior when compiling a c recursive function with const parameters

Given the following function:void rec_func(int a, int b, const int c) { /* flow control and stuff here */ rec_func(a - 1, b, c); } Will gcc understand that c is the same constant value for all the...

View Article


Where should function attributes go?

Suppose I want to mark a non-inline function with [[gnu::cold]]; should the attribute be placed in the declaration in the header, or should it go with the definition in a source file? Assume that I...

View Article

How to resolve gcc compiler optimization-induced segmentation fault on centos...

I have a large C++ software project build with gcc. After adding some new code into the repository, one of the binary started to get Segmentation Fault on larger test data (no segfault on a few smaller...

View Article


Link error building GPU offload C++ library with GCC for Python

I am building up an external C++ library for my python script, using gcc-7.3.0 with openmp4.x that offloads to NVIDIA GPUs. I had built up gcc successfully for both the host linux (CentOS-7) and the...

View Article

gcc found but not executing on windows git bash

In installed gcc on windows via msys32. On powershell and on command prompt it executes properly. The only strange thing: which gcc yields /usr/bin/gcc, yes with unix slashes. In real world it is...

View Article


Debugging SFINAE in gcc or clang

I would like to know how my template/s are expanded at compile time given a specific invocation, in particular I'm interested in getting to know more about all the possible use and behaviours of the...

View Article

What exactly is the difference between various optimization levels in gcc/g++?

Before anyone would tell me to look up old answers or RTFM, please note that I've already done so, so please read the details before directing me to look elsewhere.I've established that the difference...

View Article

overflow in implicit constant conversion [-Werror=overflow] in class member...

There has been several similar questions, but this one could(?) be due to a bug in the compiler of gcc. The only const is the parameter vvalue. I have changed to char* and still got the same compiler...

View Article
Browsing all 22075 articles
Browse latest View live


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