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

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.

Related

Compile a C++ program (LANShare)

I'm having problems compiling LANShare's sourcecode.
I need to compile this program because i need to use it on a 32-bit unix machine and there's no .deb or appimage release file.
This is LANShare.
As you can see there's no config file and i don't know how i can proceed with compilation.
I compiled from source many times but here there's no Readme nor instructions, then I opened an issue but there's no response yet.
Found a solution, thanks to n. 1.8e9-where's-my-share m.
Theese instructions should be valid for any Debian 10 install.
To install qt tools:
sudo apt install qt5-qmake qt5-default
then to compile:
qmake -o Makefile LANShare.pro
make
within the README.md file there is:
You can download the Ubuntu package or linux AppImage or Windows executable from the release page.
https://github.com/abdularis/LAN-Share/releases
Using .deb (Ubuntu/Debian)
download the latest version, for example lanshare_1.2.1-1_amd64.deb then open a terminal, navigate to directory where the downloaded package is located and type
$ sudo dpkg -i ./lanshare_1.2.1-1_amd64.deb

How to build PythonQt in ubutnu

I want to embed the python script in my c++ Qt application, By searching on the net I found that PythonQt is exactly what I am looking for but when I went to it's github repo there is build description given for windows system but not for ubuntu system so after cloning the repo if I include it's src in my Qt .pro file it gives me output that
Python.h not found, I think the reason is that I didn't build it in my system. Is there anyone who could tell me that how to build PythonQt in ubuntu. The link for their repo is this: https://github.com/MeVisLab/pythonqt
If this didn't work you can also suggest me some other thing which will help me to embed python scripts into my Qt c++ application.
First clone the repo by using the following command
https://github.com/MeVisLab/pythonqt.git
After that cd into the clone folder and execute the below command to build it into your system.
qmake
This command will generate the MakeFile into your current directory run the following command to completely build the PythonQt in your system.
sudo make all
sudo make install
While executing those commands if you get the following error
fatal error: 'private/qmetaobjectbuilder_p.h'
Run the below command to solve this
sudo apt install qtbase5-private-dev

Trouble installing Boost C++

Right now, I am trying to install boost on my computer, a Mac running Mavericks. I have downloaded and decompressed boost into the directory
$HOME/local/src/
After decompressing, I moved it to a new directory inside the boost source directory:
tools/build/v2
I then executed
./boostrap.sh --with-toolset=gcc
This all went fine. The next step is where the problems start: in the src file, I executed the following command:
tools/build/v2/boost_1_57_0/b2 install --prefix=PREFIX --toolset=gcc --with-program_options --with-filesystem
It then returned the following error:
Unable to load Boost.Build: could not find "boost-build.jam"
---------------------------------------------------------------
BOOST_ROOT must be set, either in the environment, or
on the command-line with -sBOOST_ROOT=..., to the root
of the boost installation.
It says it can't find boost-build.jam, but I open up the folder in Finder and I see boost-build.jam right there in my boost_1_57_0 folder. What can I do to execute this command? Am I doing something wrong? If it runs correctly, I should have a PREFIX/include directory with header files for boost. What can I do to get this? Here is a link to the site for Boost if that will help:
http://www.boost.org
Also, I have already found this page on how to install Boost:
How do you install Boost on MacOS?
Will the method this user describes give the same result that the code above would if it was functioning properly? Thank you in advance.
Install brew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then do:
brew install boost-build
After that you will have the bjam executable in /usr/local/bin/bjam.
Thank you to elyase for his response. I have also found a way to solve the problem posted above that doesn't use brew. I was making the mistake of making a new tools/build/v2 folder in my src folder--however, I was supposed to cd into the tools/build folder already in the downloaded boost folder. Also, in the newer versions of boost, there is no v2 folder--so just use
tools/build/b2 install --prefix=PREFIX --toolset=gcc --with-program_options --with-filesystem
Hopefully this will help people who are new to Mac (like me) who are having similar problems.

How do I install Audiere?

I'm trying to install PyAudiere (on MacOS 10.5), and it needs Audiere installed. I downloaded the Unix source from the Audiere website and ran configure and the makefile. I also tried adding audiere.h to the g++ include path with the command:
g++ -I /[...]/audiere-1.9.4/src audiere.h.
This did something, but I'm not sure what. When I try to install PyAudiere using
python setup.py install
it always says
error: audiere.h: No such file or directory.
Have I installed Audiere? If not, how do I do it?
Disclaimer: I know virtually nothing about mac OS
If you have run configure:
./configure
and the makefile:
make
Have you then run:
make install
Without running make install you have simply compiled the files but not installed them into your system. Under linux you might have to run sudo make install in order to get the administrative privileges required to install files.

Enabling OpenGL in wxWidgets

I installed the wxWidgets source code, compiled it and am linking the libraries thus obtained with my application code. Now I need to use OpenGL in my wxWidgets application. How do I enable this?
For building on Windows with project files:
Assume $(WXWIDGETSROOT) is the root directory of your wxWidgets installation.
Open the file $(WXWIDGETSROOT)\include\wx\msw\setup.h
Search for the #define for wxUSE_GLCANVAS.
Change its value from 0 to 1.
Recompile the library.
For building on Linux and other ./configure based platforms:
Just use ./configure --with-opengl
(A mashup answer from two partial answers given by others)
If you're using configure to build wxWidgets you just need to add --with-opengl to your command line.
Just to add a little bit... If you're on linux you need to watch the logs when running configure. If it can't find opengl dev packages then it will turn opengl off with one line of warning which is easy to miss.
run it like this to make it more obvious what development libraries you're actually missing (it looks like the --with-opengl is on by default in 3.0.0 and possibly earlier versions of wxwidgets, but it can't hurt to include it I suspect).
./configure --with-opengl > configure.log
Once configure can find all the dev libs you think you're going to use you need to rebuild wxwidgets:
make
sudo make install
I had to install these on linux mint to make wxwidget's configure happy as far as opengl was concerned (and should also work for ubuntu) to get the dev libs I needed.
sudo apt-get install mesa-common-dev
sudo apt-get install freeglut3-dev
(Assume $(WX_WIDGETS_ROOT) is the root directory of your wxWidgets installation.)
Open the file $(WX_WIDGETS_ROOT)\include\wx\msw\setup.h
Search and find the option wxUSE_GLCANVAS. Change its value from 0 to 1.
Recompile the library.