I am new to the computer and as I wanted to install Cmake instead of installing it in usr/bin or usr/local/bin I installed it in Users/Admin/Source!
Could you help me to figure out how can I change its directory or do I have to uninstall it completely?!
To install Cmake I followed the steps here http://mac-dev-env.patrickbougie.com/cmake/, except the first line.
Thanks
If you successfully went through the steps in the link you provided, cmake is now installed in /usr/local/cmake/bin.
(From what I understand you just did the download in another directory which is fine).
Since the tutorial also tells you to add this directory to your PATH it should be fine. i.e cmake should be accessible from anywhere after sourcing again your .bash_profile or simply opening a new terminal.
If for any other reason you need cmake to be in /usr/local/bin. you can create a symbolic link in this directory:
ln -s /usr/local/cmake/bin/cmake /usr/local/bin/cmake
Related
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
I have two CMake versions installed: one in /usr/bin/, the latest one in /opt/.
From the command line I can specify the latest version, and the C++17 code is compiled successfully.
From KDevelop, after setting the default CMake executable to /opt/cmake, the old version is still executed.
Is there anything else to set in KDevelop to let it find the new version?
Do I have to deal with KDevelop's plugins?
System:
Linux (Debian), KDevelop 5.2.1, CMake 3.7, CMake 3.10.2, Ninja
You can set the path to the CMake executable in both the global settings and the projects settings. Obviously new projects inherit the global setting but existing projects stick to their individual CMake path, even when the global setting is changed.
To change the project-specific CMake executable:
open the project settings
go to CMake tab
click on "Show Advanced"
change the "CMake executable" at the bottom
Temporary fix:
cd /usr/bin
sudo mv ./cmake ./cmake-old
sudo mv ./cmake-gui ./cmake-old-gui
sudo ln -s /path/to/cmake ./cmake
sudo ln -s /path/to/cmake-gui ./cmake-gui
Of course, I would like to tell KDevelop to use the version of cmake I want.
I'm trying to install the nana C++ library in Ubuntu 16.04.
I downloaded and unzipped it into the directory with my helloworld file, and went to the directory with the makefile; nana/build/makefile, and typed make but got the error
X11/Xft/Xft.h: no such file or directory
I checked /usr/include/X11 and yeah, it's not there. Googling has not helped figure out hot to install Xft. How do I do it? Or am I doing something else wrong?
This header seems to be in libxft-dev package. Install it with your package manager. If it is apt, try:
sudo apt install libxft-dev
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.
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.