How to CORRECTLY install gsl library in Linux?

I got a problem while installing the GNU Scientific Library (gsl). I put the package on my desktop, and did "./configure", "make", and "sudo make install", according to the document included. I...

Using GSL on Windows (compiling, linking, ect). A Step by Step Guide

I need to write some C code using GSL (GNU Scientific Library), and have never used libraries before. I am a Physicist, not a computer scientist, and struggle with a lot of the jargon in the GNU...

How to force c++ compiler use one of different installed package's versions, using CMake?

ROS Fuerte I installed on my machine uses opencv 2.2. I would like to use 2.4.9 version just installed. Its location is /home/polar/soft/lib/opencv/opencv-2.4.9/build/lib. How to do that with...

Why can't I construct a gsl::span with a brace-enclosed initializer list

According to the C++ Core Guidelines, I should use a gsl::span to pass a half-open sequence. I think that means that instead of writing a function like: void func(const std::vector<int>& data) { ...

Why is there a /usr/local/opt directory created by Homebrew and should I use it?

I am quite new at using homebrew and I am trying to figure out how it works to use some libraries (boost, gsl, openblas for example) in my own project. I have understood that each formula is...

Riemann zeta function with complex argument

Riemann Zeta function can be defined in the complex plane. Why beside its complications, in C++17, GSL and Boost C++ the argument can be only real(double)?

Why is `"literal"` encouraged to decay to `const char*` in C++ argument type match?

I'm playing around with overloading operators in c++14, and I tried to match two types of arguments: any-old-const-char*, and a-string-literal. That is, I'm trying to see if I can discriminate...

How to integrate std::valarray<double> with gsl?

I am relatively new to C++, but I have some (scarce) coding and numerical experience. I know that this question gets posted every now and then, how do you integrate an array. In MATLAB you can...

How to prefer `defaults` numpy over `conda-forge` numpy when installing `conda-forge` package

I prefer using the MKL toolchain from the usual defaults channel provided by Continuum. Like many people, though, I find myself installing quite a few packages from the conda-forge...

RStudio crashing with RcppGSL function

I am working on speeding up one of my R programs, that solves a vector of score equations, with Rcpp. Since intermediate steps in computing these score equations require interpolation and...

Do not use array subscript when the index is not an integer constant expression; use gsl::at() instead

I was trying to create some example code in Microsoft Visual Studio which looks like that int main() { const size_t size = 10; int arr[size]; for (size_t i = 0; i < size; ++i) ...

Integration of CMake with the Visual Studio 2017 C++ Core Guidelines Checker (CppCoreCheck)

I currently try to integrate the C++ Core Guidelines Checker (CppCoreCheck) of Visual Studio 2017 with the meta build system CMake using the Visual Studio 15 2017 Win64 generator. The following...

Trouble using gsl/gsl, from brew, on iOS?

brew install gsl - no trouble quickly make a Mac app which uses gsl, to check it is working. (Handy example here.) - no trouble are they there in /include and /lib - yes they are both...

R package build failing on Windows machines (AppVeyor) due to missing GSL - GNU Scientific Library

I am developing an R package called DescObs (https://github.com/MaaniBeigy/DescObs). It imports conf.limits.nct function from MBESS, which itself depends on another package called gsl. It shows...

How can I tell PVS-Studio to ignore all of the files in a third party library when using CMake on Linux

I am using PVS-Studio with CMake on Linux. I recently added a third party library to my project. PVS-Studio is flagging possible issues in the header files for the third party library. How do I go...

How to "reset" gsl::owner<T>?

When I create an object and append it to a list auto o = new object; m_objects.push_back(o); I get several hints from the compiler that I should clean up my code along the C++ Core Check...

Don't use static cast for arithmetic conversions (cpp-core-guidelines)

msvc's code analyzer for the cpp core guidelines tells me Warning C26472 Don't use a static_cast for arithmetic conversions. Use brace initialization, gsl::narrow_cast or...

Cannot launch my docfx project due to pathing problem

I have a DocFx project folder which contains all the correct files to host the project. On my laptop, I'm able to use the code docfx docfx.json --serve to host the project on my localhost...

Undefined reference errors in RTI DDS when using modern c++ API

I generated RTI code using: /opt/rti_connext_dds-6.0.0/bin/rtiddsgen -d GENERATED_CODE_DIR -language C++11 -replace IDL_DIR My CMake file: link_libraries(gsl gslcblas nnz12 occi clntsh dl nddsc...

Numerical derivative with C++

This question appeared a thousand times on different platforms. However I still need to understand something. Here is a complete example: #include <iostream> #include <iomanip> #include...

Math Parser for Complex Numbers in C (ExprTk)

I have been using the ExprTk library quite frequently in the past in order to further process large output files generated with Mathematica (containing mathematical expressions) in C. Until now, I...

Why is the GNU scientific library matrix multiplication slower than numpy.matmul?

Why is it that the matrix multiplication with Numpy is much faster than gsl_blas_sgemm from GSL, for instance: import numpy as np import time N = 1000 M = np.zeros(shape=(N, N),...

SCIP 7.0.3 installing using cmake on macOS TBB error

I am trying to build the SCIP 7.0.3 opt suite on my Mac machine and I facing some issues. I am using CMake to generate the make Makefile and once I type make, I am failing at the linking step. I...

R cannot load libraries calling lapack functions

I'm trying to install some of the popular R packages but somehow my R does not see the lapack installation. Or rather the compiler doesn't see it, I guess, because when it checks LAPACK_LIBS it...

Bokeh/panel won't render in-line with Jupyter Lab

I'm trying to visualize Bokeh plots and panels with a Bokeh backend in a notebook in JupyterLab. Things were running fine until I updated. Current packages and versions are below I have tried the...

Fixing parameters of a fitting function in Nonlinear Least-Square GSL

I'm working on some code that I'm writing which uses the [GNU Scientific Library (GSL)][1]'s Nonlinear least-squares algorithm for curve fitting. I have been successful in obtaining a working code...

libstdc++.so.6: version `GLIBCXX_3.4.26' not found on Linux

I was trying to load Seurat package in rstudio and got this error Error: package or namespace load failed for ‘Seurat’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object...

strict total order of std::less<Pointer>

This question comes from this comment: If you have say two vectors a and b, the total order is permitted to be &a[0], &b[0], &a[1], &b[1], &a[2], &b[2], ..., i.e., with the elements...

Installing R gsl package on Ubuntu

I am failing to install the R package gsl on my ubuntu 18.04 LTS, and I don't understand what the problem is. From within R: > install.packages('gsl') * installing *source* package ‘gsl’...

fatal error: 'unistd.h' file not found on Mac OS Monterey

I am pretty new to the MacOS so any help would be greatly appreciated! I am trying to compile a programme on my Mac (M1 chip with arm64 architecture, Mac OS Monterey) which requires x86_64...