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

How to call cuda libraries from OpenACC C++ code by g++?

I want to use cuda libraries (cublas, cusparse cusolver) in OpenACC code by g++-8.Can g++-8 use cuda libraries like PGI?I wrote following code, that needs cublas or cublas_v2.//...

View Article


Running openacc -gfortran in cluster

I'm compiling and running a Fortran 90 program using OpenAcc. I was able to run the code with openacc directives in my local PC using PGI compiler. But now I'm trying to run the same program in a...

View Article


Why std::size() is not a member of std in gcc 8.2.0

I'm trying to teach myself some C++17.Why is the compiler throwing an error for the below code snippet?#include <iostream> #include <vector> #include <iterator> int main() {...

View Article

Wired iOS crash stack without the called function

the code block below is the crash stack of a iOS APP, which using Cronet.we want to know the exactly crash line in the source code according to the last crash frame 1,as we can see, is the function of...

View Article

node-gyp build error on arm64 - error: 'WeakCallbackData' in namespace 'v8'...

I am building a js wrapper for cpp using swig. I tried it on fedora and it is working perfectly fine(fedora 30. gcc version 9.1.1). But when I am building same code on arm64 operating system(gcc -...

View Article


ARM softfp vs hardfp performance

I have an ARM based platform with a Linux OS. Even though its gcc-based toolchain supports both hardfp and softfp, the vendor recommends using softfp and the platform is shipped with a set of standard...

View Article

Preprocessor symbol in library and change the symbols value while using the...

I have a library project with a inline function in my Lib.h: static inline void DoStuff(void) __attribute__ ((always_inline)); static inline void DoStuff(void) { #if(SYMBOL == 1) // Stuff #elif(SYMBOL...

View Article

How to enable -Werror using GCC pragma?

I have a few files where i'd like to be strict about warnings, and i use GCC to build my project.I've tried #pragma GCC diagnostic error "-Wall" as per...

View Article


Error while installing whitespace hook for dune

I need to install dune for one of my PDE-lectures and we were given this file as installation:install.sh:# here you may manually define command names # comment out these definitions to overwrite the...

View Article


Exactly what cases does the gcc execstack flag allow and how does it enforce it?

I have some example code here which I'm using to understand some C behaviour for a beginner's CTF:// example.c #include <stdio.h> void main() { void (*print)(); print = getenv("EGG"); print(); }...

View Article

How to set gcc to use intel syntax permanently?

I have the following code which compiles fine with the gcc command gcc ./example.c. The program itself calls the function "add_two" which simply adds two integers. To use the intel syntax within the...

View Article

GCC ARM Os Template function optimization

class GpioF7xx : public Gpio { public: template <uint32_t PIN> static GpioF7xx create(GPIO_TypeDef* base) { static_assert(PIN >= 0 && PIN =< 15, "Gpio pins are only available from 0...

View Article

How to interact with RISC-V CSRs by using GCC C code?

this is my first question to be asked here on stackoverflow, so please be kind with me ;)I'm new to RISC-V and low level C coding and I'm wondering how to manipulate the RISC-V CSRs using GCC C code.A...

View Article


Disabling __tls_get_addr_opt for PPC

I develop software for an embedded device using the PowerPC architecture. Recently we got a new firmware upgrade and the manufacturer has provided a toolchain which is incapable of building runnable...

View Article

How to plant my own code at the beginning/end of each function with GCC

GCC (I am using GCC-4.8.5) has the concepts of prologue and epilogue, which are used to generate codes at the beginning and end of each function. I am wondering how to insert my own code into the...

View Article


Is it possible to enable only specific C++ language features in gcc?

I have a c++14 project that currently targets gcc 7.2, and I am looking to backport code from a project that targets c++17. This project makes extensive use of if constexpr. gcc 7.2 supports if...

View Article

macOS Clang C++17 filesystem header not found

I need to write a program using the (experimental) C++17 filesystem library but clang on my Mac (macOS 10.12.03) doesn't seem to have the filesystem header included.Since I'm required to use the C++17,...

View Article


Is it possible for preprocessor to check if a linker option is used?

I have a timer program which uses clock_gettime. This requires -lpthread option to compile successfully or else it gets undefined reference to 'clock_gettime' error. As so far I explored that we can...

View Article

error: '__s1_len' undeclared (first use in this function)

I'm trying to compile a really old version of PHP and am getting this error:/tmp/php-5.0.5/ext/openssl/openssl.c:3198:11: error: expected ';' before '__s1_len'...

View Article

When c++ instantiating method?

I am trying to compile this code with gcc and clang:#include <iostream> #include <type_traits> template<int N> struct Test { template<typename = std::enable_if_t<N == 1,...

View Article
Browsing all 22001 articles
Browse latest View live


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