Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mingw-64 - Install package

I am using mingw_64 and CLion in Windows 10 to try to use a library (https://github.com/libtrading/libtrading) in a simple project, but the library requires some packages to be installed prior the use of the library. The thing is that the installing instructions are for Linux environment as follows:

# Debian
$ apt-get install pkg-config libxml2-dev libglib2.0-dev libncurses5-dev \
    python-yaml libevent-dev

# Fedora
$ yum install zlib-devel libxml2-devel glib2-devel vim-common ncurses-devel \
    python-yaml libevent-devel

# OSX
$ brew install libevent glib pkgconfig
$ pip install pyyaml

So, how do I install these pre-requisites in my mingw_64 and CLion in Windows 10 environment?

like image 580
Joe Almore Avatar asked Aug 10 '17 15:08

Joe Almore


2 Answers

If you installed MinGW through MSYS2, you can use the MSYS2 pacman package manager to install additional packages:

The MSYS2 software distribution uses a port of pacman from Arch Linux to manage (install, remove and update) binary packages and also to build those packages in the first place.

Finding package

pacman -Ss <name or part of the name of the package>

Installing a package

pacman -S <name of the package>

Example:

$ pacman -Ss libxml2
mingw64/mingw-w64-x86_64-libxml2 2.9.8-1
    XML parsing library, version 2 (mingw-w64)
. . .
$ pacman -S mingw64/mingw-w64-x86_64-libxml2
resolving dependencies...
looking for conflicting packages...

Total Download Size:    1.37 MiB
Total Installed Size:  11.06 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages...
:: Processing package changes...
(1/1) installing mingw-w64-x86_64-libxml2           [##################################] 100%

A shorter version of pacman is pacboy. For example, you can specify the :x suffix to install a mingw64 package:

$ pacboy -S libxml2:x
like image 189
rustyx Avatar answered Sep 18 '22 06:09

rustyx


MinGW does not have any package management, so installing dependencies usually means building them yourself from source. For those self-built packages I have a Unix-like directory structure (with the usual bin, lib, include, etc. directories) apart from the MinGW installation.

Before I expand on that, please check if libTrading supports Windows at all. A quick glance over the libTrading GitHub shows no mention of Windows anywhere. That may mean that the project does not support Windows at all. But then we’re no more talking about configuring a build environment, but adding support for a whole new operating sytem to that project.

like image 28
besc Avatar answered Sep 17 '22 06:09

besc