Building GSL (GNU Scientific Library) in Windows for use with VS2005 - cygwin

I'm trying to get GSL working in a windows environment for my team and I'm running into many problems.
My team develops in C++ in VS2005, and we'd like to use GSL. I've downloaded the GSL-1.15 tar.gz, and unzipped it, but i'm not really sure what to do from here - I believe only two compilers will build it properly.
On the GNU website, it says that a compiled version of GSL is available as part of Cygwin on windows, so I installed Cygwin, but again, I'm not really sure what to do from there.
Ideally, what I'm trying to get is a folder on my C:\ with a bunch of dll / libs that I can link to in VS2005 to use the GSL functions. I'm aware of GSL ports to VS (http://gladman.plushost.co.uk/oldsite/computing/gnu_scientific_library.php), but we can't rely on them as I would be dependent on the publisher releasing a port every time a new version of GSL is released.
Has anyone successfully gone through this process of building GSL and getting it to work with C++ in VS2005? I've done some google searches and haven't found anything that I understand.
Thank you.

With Cygwin
Install one or more of the GSL packages
gsl
gsl-apps
gsl-devel
gsl-doc
With MinGW
I have personally built GSL with MinGW using this incantation
wget ftp.gnu.org/gnu/gsl/gsl-1.15.tar.gz
tar xf gsl*
cd gsl*
./configure
# Warning, make takes about 7 min.
make
make install
ref

Related

Cross compile from Linux to Windows using mingw

I'm trying to compile a application developed under Linux Debian for Windows 10 using the mingw compiler and cmake.
I configured a toolchain file according to the tutorial from kitware . This works great as long as I have no dependencies to libraries. Following the tutorial I have to install the libraries in the second path of this line:
SET(CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc /home/<USER>/mingw-install )
I tried to download the library sources (e.g. for Termcap) but I have not really an idea how to install the library under the path /home/<USER>/mingw-install using MinGW.
Could somebody give a example for Termcap what commands I have to invoke or a link to a tutorial?

Cygwin MinGW package vs. standalone MinGW

I would like to have a POSIX environment in Windows (to be used as a system shell) and at the same time produce native Windows executables. One option in the past was to install Cygwin and MinGW and possibly call MinGW compiler binaries from Cygwin.
Now an x64 MinGW is available straight as a Cygwin package and there are some blogs documenting how to get them play nicely together.
Before adopting this solution, I would like to know how and if the Cygwin package is different from a standalone MinGW-w64. Specifically which one is more efficient in producing native Win64 exe's? Is Cygwin package itself based on native executables, or is an extension to its gcc compilers?
Update
Some of you miscomprehended this question:
I am not interested in the difference between Cygwin and MinGW at all.
(and by the way, on the very home page of MinGW their main concern is to show how they differentiate from Cygwin)
My question instead is very specific: I am interested in the difference between a specific Cygwin package and its standalone version.
This package happens to be "mingw64-x86_64", which is split in several dependencies files, of which the most relevant is perhaps "mingw64-x86_64-gcc-core".
Sorry, but references found in some comments are utterly wrong with respect to what is asked here: first they address to Cygwin as a whole and not the mentioned package; secondly they refer to a rather old MinGW version, significantly different from that mentioned here (see here for the differences).
Someone also mentions MSYS2, which is a modern Cygwin fork, but again I am not interested to Cygwin (as whole), but to the said package.
Some of you might not be aware of this package, and in fact, if you google for "mingw64-x86_64", you don't find anything relevant for the Cygwin package, and most likely land on the general version, and this is why I am posting here.
TL;DR: Install Cygwin and the package mingw64-x86_64-gcc-core.
if the Cygwin package is different from a standalone MinGW-w64
They are the same.
MinGW - this is the project that can be found at mingw.org and
sourceforge.net/projects/mingw. This project has been superceded by the MSYS2
and MinGW-w64 projects.
Cygwin environment - Unix-like environment, namely Bash.
Cygwin compilers - these are the packages gcc-core and cygwin32-gcc-core
which include the files x86_64-pc-cygwin-gcc.exe and
i686-pc-cygwin-gcc.exe. These compilers create programs that rely on
cygwin1.dll.
MSYS2 environment - Unix-like environment, namely Bash. This is an
update to the MSYS environment provided by the old MinGW project.
MinGW-w64 compilers - these are the packages mingw64-x86_64-gcc-core and
mingw64-i686-gcc-core which include the files x86_64-w64-mingw32-gcc.exe
and
i686-w64-mingw32-gcc.exe. These compilers create Windows native
programs that do not rely on cygwin1.dll.
What do the C compilers on Cygwin generate?

How do I download and install GNU Fortran compiler? Or should I use codeblocks?

I'm having trouble navigating GNU's website and finding the necessary files. And I strongly suspect the installation process isn't going to be straightforward given how their website is designed.
Or should I use Codeblocks instead?
Do I also need to install Cygwin since I'm running Windows 7?
(I have prior, basic experience with C, Matlab and Wolfram Mathematica programming)
I downloaded gfortran-windows-20140523.exe from http://users.humboldt.edu/finneyb/gfortran-windows-20140523.exe as suggested on https://gcc.gnu.org/wiki/GFortranBinaries#Windows and was able to install gfortran from this binary on Windows 8.1 and to compile a Fortran program. Gfortran --version says 4.9.0 20131208 (experimental)

How can I build gettext 64bit dll on Windows.

I succeeded to build gettext 32bit dll on Windows.
I installed these.
gettext-0.18.11
mingw (include msys)
./configure --prefix=/mingw --enable-threads=win32 --enable-relocatable
cd gettext-runtime
make
But I don't know how to build 64bit dll.
Someone said I should use mingw64. Then I installed mingw64 and msys.
But I don't know how to do setting mingw64 and msys to build 64bit dll.
And I don't know gettext configure option to build 64bit dll.
Thanks.
Download latest MinGW-w64 targeting 64-bit (there are also targeting 32-bit, so be careful) here.
NOTE: As you added --enable-threads=win32, then probably you would be interested in the distribution with Win32 threading support, rather than POSIX, so be cautious when you choose which one to download.
Configure in almost the same way, but with addition of one option:
./configure --build=x86_64-w64-mingw32 --prefix=/mingw --enable-threads=win32 --enable-relocatable
Lean back. :)
First download gettex from here: https://mlocati.github.io/articles/gettext-iconv-windows.html
then add system var PATH: C:\Program Files\gettext-iconv\bin
afterwards
create in your project a folder that bears the note of
locale/
afterwards
add variable in settings.py: LOCALE_PATHS = (BASE_DIR + 'locale/', )
and
finally try to run
python manage.py makemessages -l fr

CMAKE building for cygwin

I used CMAKE to create the Visual Studios C++ project for a library that I needed to build, and then I used VC++ to build the library. However, the time has come to rebuild the same library for cygwin so that I can link to it with the GNU tool chain (g++ make gdb). I've been trying to figure out how to configure CMAKE to build for cygwin but I'm not getting very far. I've checked the CMAKE website for help (and I will continue to search around there), but I barely have a grasp on what CMAKE really is, so I am having trouble finding the answers. Can anyone point me in a better direction? (Thanks, All.)
CMake is a build system. It's designed to let you write a single cross-platform build description, then it creates platform-specific build files (such as makefiles for the GNU toolchain) from that build setup.
To make it work under Cygwin, it should suffice to install the cmake Cygwin package (using Cygwin's setup.exe) then run commands similar to the following: (Since you'll be running CMake for Cygwin, you won't need to do anything to configure it for the GNU toolchain).
mkdir my-project-build
cd my-project-build
cmake /path/to/my-project
make

Resources