How I install wxWidgets in msys2 correctly? - c++

I'm having trouble installing wxWidgets in msys2, I used pacman to install the library
pacman -S mingw-w64-clang-x86_64-wxwidgets3.0-msw
But when I try to execute a test file it gives me this error
fatal error: wx/wx.h: No such file or directory
Reading online I see that are in another methods of installing the library you have to compile it, but I can't find any information in regards to installing it with pacman.
I also tried to compile it myself with Cmake following the instructions in the wxwidgets page but I failed and I want to see what should I do now.
What I need to do to get this to work?

Related

Boost MPI flags can't be found when installing Repast HPC

Using M1 Mac, I've followed the manual install procedures to install Repast HPC.
I'm trying to run ./install.sh rhpc and the following error persists:
configure: error: cannot not find the flags to link with Boost mpi
The suggested solution says to add the compiler wrappers with the following commands:
export PATH=$BASE_DIR/MPICH/bin:$PATH
MPI_COMPILER_INVOCATION=$BASE_DIR/MPICH/bin/mpicxx
which didn't work as the command mpicxx still couldn't be invoked.
So I tried installing mpich through homebrew, where mpicxx now works outside of the install. However, the error persists.
So I tried installing boost through homebrew and directing the install to the homebrew directory, but the error persists.
So I tried installing open-mpi through homebrew, and mpicxx still works, but the error persists.
Any suggestions? I'm running out of online resources to solve the issue.

Can't compile fabric on windows - missing ltdl.h

I am trying to build a chaincode using go build.
Environment:
installed go 1.8.3 windows/amd
Windows 10
When I run go build I get the following error:
# github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11
..\..\github.com\hyperledger\fabric\vendor\github.com\miekg\pkcs11\pkcs11.go:29:18: fatal error: ltdl.h: No such file or directory
compilation terminated.
I checked and my GCC installation does not contain the ltdl.h file in the include folder.
I found a SO post with a solution for Linux, but not one for Windows.
Can someone help?
On windows you can build without PKCS
go build --tags nopkcs11
Try running the following command
sudo apt install libtool libltdl-dev
Make sure go get -u github.com/hyperledger/fabric/core/chaincode/shim throws no error then go build it.

Hello World in OpenCV (compiling and linking from source on Ubuntu)

I'm trying to compile OpenCV from source and create a test C++ program which uses the newly compiled OpenCV library.
Compiling OpenCV appears to work, I followed this guide.
But now I want to create a test program which uses the library.
I followed this guide, but and everything appeared to work until I tried the command:
./DisplayImage lena.jpg
Which gave me the following error
OpenCV Error: Unspecified error (The function is not implemented.
Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you
are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then
re-run cmake or configure script) in cvNamedWindow, file
/media/chris/Archive2/Archive/Programming/OpenCV/sav/opencv/modules/highgui/src/window.cpp,
line 550 terminate called after throwing an instance of
'cv::Exception' what():
/media/chris/Archive2/Archive/Programming/OpenCV/sav/opencv/modules/highgui/src/window.cpp:550:
error: (-2) The function is not implemented. Rebuild the library with
Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian,
install libgtk2.0-dev and pkg-config, then re-run cmake or configure
script in function cvNamedWindow
Aborted (core dumped)
the mentioned packages appear to be installed
I've tried rebooting my computer after installing the packages and I still get the same message.
Solved it
Looks like I was missing some of the packages mentioned in http://docs.opencv.org/2.4/doc/tutorials/introduction/linux_install/linux_install.html
even though libgtk and pkg-config were installed

Installing c++ boost using cygwin: can't find configure file

I'm trying to install Boost for c++. Since I use cygwin (on Windows 7) I follow these instructions for Unix.
I start by downloading boost_1_55_0.zip from sourceforge. The instructions tell me to run tar --bzip2 -xf /path/to/boost_1_55_0.zip but this doesn't work (probably because the downloaded file is .zip and not .tar.bz2; I can't find the latter anywhere to download), so instead I use winrar and unzip it into /usr/local.
After this the header-only libraries work fine, but I need the ones where a build is necessary.
The instructions tells me to go to the boost folder and run./configure --help, but this doesn't work; I get the message -bash: ./configure: No such file or directory. So I locate the file configure in the folder /usr/local/boost_1_55_0/tools/build/v2/engine/boehm_gc, go there and try again, and this time it works: I get the help for configure.
I then try to run ./configure --prefix=/usr/local/boost_1_55_0 --enable-cplusplus but get the error message configure: error: cannot run /bin/sh ./config.sub. I try it with only one or none of the options too but that doesn't help.
Any ideas?
I don't know what guide you're following, but to install boost I have done:
cd boost
./bootstrap.sh
./b2
./b2 install
stop
As report boost doc:
If you plan to build from the Cygwin bash shell, you're actually
running on a POSIX platform and should follow the instructions for
getting started on Unix variants. Other command shells, such as
MinGW's MSYS, are not supported—they may or may not work.

Error: boost/scoped_ptr.hpp: No such file or directory while using libkml

I am developing a software which uses Google Map database. I searched google and I found a library in C++ can do that - libkml. I've downloaded some examples code in this website, but when I compiled with this command: g++ main.cpp -lkml, it occured an error:
fatal error: boost/scoped_ptr.hpp: No such file or directory
What is "boost/scoped_ptr.hpp"? I try finding this file in terminal
locate boost/scoped_ptr.hpp
but there's nothing.
You need to install the boost libraries from http://www.boost.org/
Depending on your OS there will be pre-built solutions that you can install. For example on Ubuntu you can do sudo apt-get install libboost-all-dev. On Mac see this thread Boost: MacOSX binaries for Boost
On Windows this may help: http://boost.teeks99.com/