GNU GSL where do I find the source code? - gsl

I'm writing some code in which I use some of the GNU GSL functions.
And out of pure interest I wonder how these functions have been implemented, therefore I would like to have a look at the source code.
The problem is that I seem to be unable to find the directory at which it is located.
I know that I can find the headers in "/usr/local/include/gsl/", but where is the matching ".c" file?
Sorry if this is n00bing it, but i hope that someone can help me.

Just download a source package from their ftp, for example the latest version.
This contains all files to build this library, so not just the header files, but also the c files, together with a makefile, which specifies what is compiled in which order.

You can find the implementation on their Github page. An example of their implementation of computing mean https://github.com/ampl/gsl/blob/master/statistics/mean_source.c

Related

How to configure Eclipse C project to accept C++ includes

I have a C project in which I would like to use some C++ files.
I've modified the Makefile accordingly, but I get the
make\mingw32-make.exe[1]: *** No rule to make target
error.
I noticed that the included headers from the cpp standard library are not found.
Headers Not Found . picture
[Edit] As a note, all the .c, .cpp, .h files are in the same folder.
If I add
#include <string>
in the .c file it is found. In the .cpp it's not.
In Eclipse I've seen that I can't set includes for C++.
No C++ Includes . picture
Is there a way to do this ?
Thank you.
Unfortunately I didn't find any solution for this issue.
Still I am on the right path as there is a way to use the C code from Alglib.
http://forum.alglib.net/viewtopic.php?f=2&t=3766
It may be better to download CPython version of ALGLIB and to work with source of its computational core. It is written in C, without even trace amounts of C++, so you may find it more convenient than making wrappers around C++ core.

(C++) How to use OpenBlas libraries with C++?

Sorry if this all seems too simple but I'm a beginner and I'm trying to use the OpenBlas libraries in my C++ IDE "CodeBlocks" on Windows. More specifically, I'm want to use the matrix-vector multiplication and solving of a tri-diagonal matrix system libraries. I've downloaded the files at the bottom of the page on the OpenBlas site. I'm not sure how I would even start, as there are little/no resources online for beginners such as myself. What libraries do I need to include in my .cpp file preamble, have I even downloaded the correct set of files, which files do I need to include in my working directory, etc?
Thanks in advance.
EDIT: I've downloaded the pre-built files as recommended and followed every step in the link below.
http://www.learncpp.com/cpp-tutorial/a3-using-libraries-with-codeblocks/
I have also included #include "cblas.h" in the preamble of my .cpp file but I am getting a undefined reference to 'cblas_XXXXX' error in my build messages. What is the reason for this?
Download the pre-built winodws library
https://sourceforge.net/projects/openblas/files/v0.2.15/OpenBLAS-v0.2.15-Win64-int32.zip/download

How to use a library in a single file C++ code?

How can I use a library such as the GMP library in C++ in such a manner that the file can be compiled normally without having the person compiling to install the GMP themselves. This is for personal use(so no license issues etc.). I just want my client to be able to compile my C++ code which needs the GMP library. I tried using g++ -E option, and it kinda works, but the problem is that on top of it are included many files which are themselves part of the library(and not available without the lbrary). Also the linker needs the availability of the library even if I do do that successfully.
How do I copy the entire library per se, maintaining a single file of code, such that it compiles and doesn't cause problems. I'm quite sure it is doable, because copying some functions works like a charm, but I can't copy paste the 3000 line code manually, so how to do it?
If I understand you correctly, I guess what you want is to have your source and the entire GMP library in one file? And you want to do that automated?
I think there is no standard way to do this. You could write a script in you favorite language (bash, python, etc) which traverses the GMP code tree, appending the files (first the header files, then the cpp files) to your file while ignoring all local #include-lines. And hope that there are not too many macros etc which rely on the folder structure to be intact.
However, you could (and probably should) just supply the library and a adequate Makefile with your source code. Then the client wouldn't need to install the GMP lib, but could unpack the archive and run make. If the constraint is to do this in one file, maybe it is wiser to change that constraint...

gtksourceview compiling in code blocks

i want to use gtksourceview in my c++ project. I dig around the IDE of code::blocks and really find it helpfull. i specify gtkmm directory in linker and include options but as i look for gtksourceview i found a libgtksourceview-2.0-0.dll file i really don't know how to add this in code::blocks and use gtksourceview. I am have programming experience in C for microcontrollers just and now i have not really idea about the compilation process of gcc and g++. and can i able to add the file directives as
#include <gtksourceview/gtksourceview.h>
please help
sorry if it seems so basic question for someone but i really stuck of to compile the code and then asking.
I am using windows by the way.
Thanks in advance
There are two different things: the runtime libraries and the development headers. The former allows you to run the applications (also to link them), the later to compile them. Either you are missing the header files (gtksourceview.h in your example) or setting the PATH in your IDE to find the header files.
Check the manual for 'Including libraries'.

Where can I download the source code to the GNU C++ Standard Library?

I downloaded the GNU Standard C Library (glibc) source code at http://ftp.gnu.org/gnu/glibc/. Where can I find a similar download for their C++ Library?
I have googled around a bit and cannot seem to find it.
The only reason I need it is I want to see how it is implemented. So please don't give me links to binaries or to just the header files because it is the implementation source files that I am looking for.
It's in the libstdc++-v3 directory in the g++ (gcc-c++) sources.
GCC mirror sites:
https://gcc.gnu.org/mirrors.html
Looking for what you want.