I'm using CMake as a build tool to create C++ shared library with Rcpp. To trigger CMake while invoking R CMD INSTALL command the top configure script need to look something like this:
rm -rf _builds
cmake -H. -B_builds
cmake --build _builds
...
Such approach works nicely on Linux and Mac OS, but not on Windows machine.
What version of CMake expected in configure:
windows native cmake
cygwin cmake
What generator do I need to use:
Unix Makefiles (cygwin)
MSYS Makefiles (native)
MinGW Makefiles (native)
SSCCE
https://github.com/forexample/rcpp-test
Leave all Makefile files (Makefile.win for windows) empty:
all:
Put CMake build instructions into configure (configure.win for windows):
cmake -H. -B_builds
cmake --build _builds
Such approach works nice for me on Linux, Mac and Windows (native cmake with Visual Studio generator). Note that it's probably not compatible with cran and windows build need to be tuned to compile different architectures (see R_ARCH) but it works locally and fit my needs.
Example
Related
I need to install Qt5 with MSVC compiler (for Windows) using CircleCI.
choco installs only MinGW compiler which is not acceptable for my case. Also there are some options (e.g. choco install qt-sdk-windows-x64-msvc2012) but they look to be outdated. The file choco tries to download does not exist any more.
When I try to download the Qt offline installer and to run it from cmd using --script option it nevertheless requires the UI environment to display the window.
Could you please advise whether there is any option to install the Visual Studio compiler for Qt on Windows?
We need to support to mp4 file in QtwebengineView. So we are trying to build qtwebengine of Qt 5.9.1 on msvc2015 x64, with proprietary codecs, by using following command at cmd with working directory is qtwebengine in source.
"D:\qt-everywhere-opensource-src-5.9.1\qtbase\bin\qmake.exe WEBENGINE_CONFIG+=use_proprietary_codecs"
we are facing below error.
WinRT is not supported.
QtWebEngine will not be built
We tried to follow following link:
How to compile Qt webengine (5.11) on Windows with proprietary codecs
But that didn't work either.
How can we build qtwebengine of qt 5.9.1 with proprietary codecs?
I just successfully build QtWebEngine 5.9.6
My build environment:
Windows7 x64
Visual Studio 2015 x64
jom 1.1.2
You can refer to my build process.
Before we start building, let's install the tools:
Python 2.7.13 from https://www.python.org/downloads/windows/
Perl (Strawberry vesion) from http://strawberryperl.com/
Bison and flex from https://sourceforge.net/projects/winflexbison/ (Rename win-bison.exe to bison.exe and win-flex.exe to flex.exe)
Gperf from http://gnuwin32.sourceforge.net/packages/gperf.htm
Download the source code for qt
git clone https://code.qt.io/qt/qt5.git
cd qt5
git checkout 5.9.6
perl init-repository --module-subset=qtwebengine,qtwebview
Let's start the formal build
cd qtwebengine
qmake.exe WEBENGINE_CONFIG+=use_proprietary_codecs
jom.exe
Then there's the long build process...
The final file will be generated in the qt5/qtwebengine/bin directory after the build is completed
I installed qt5-default on my Odroid XU3 using the the sudo apt-get install qt5-default command and wanted to run qmake-qt5 using the terminal but it printed that this command is unknown. Then I looked in the usr/share/qt5 folder and noticed that there is only the doc-foder inside. I also looked in the usr/bin folder and could only find qmake-qt4 but no qmake-qt5. When I run the install command, I also read that some libraries will be installed, so I think, libraries are not the problem.
Next I tried to install qmake-q5t manually from this page https://launchpad.net/ubuntu/trusty/+package/qt5-qmake but then I got a message that there is a newer version of qmake-qt5 already installed. I searched the whole system using the find command for qmake-qt5 but couldn't detect it.
Last I also tried to add the ubuntu-sdk ppa using as described here https://askubuntu.com/questions/279421/how-can-i-install-qt-5-x-on-12-04-lts but this also didn't work out.
Does it have something to do with my Odroid or with Lubuntu? Is there any other way to install qmake-qt5?
I tried to compile and make with the already installed qt4 and this did work out using
qmake-qt4 -project
qmake-qt4
make
./helloworld
I want do the same but only with qt5
Thanks in advance
The qmake executable is installed in /usr/lib/<your_arch>/qt5/bin as qmake (no -qt5 suffix).
You can check with qmake --version, it should report you a Qt version 5.x.x
I need a minimal QT 5.0 Compiler install for Ubuntu 14.04 64bit
I just need to run qmake and have the QT includes, macros and libraries work under g++. I do not need The QT GUI development environment.
I tried the following...
wget http://download.qt.io/official_releases/qt/5.5/5.5.0/qt-opensource-linux-x64-5.5.0.run
... Follow instructions... At the end I get "Warning: QSqlDatabase: QMYSQL driver not loaded" which I need.
So I had to build from source, which takes overnight! (but does work)...
git clone git://code.qt.io/qt/qt5.git
cd qt5
git checkout 5.5
... Follow instructions... It does work.
I only want the compiler, not everything! How do I get that?
Alan.
Just install a package called build-essential + the Qt5 development packages you need (or qt5-default package). Ubuntu 14.04 has Qt 5.2.1 in the package repositories.
build-essential installs g++ tool chain and qt5-default installs the Qt5 development libraries.
Qt is not a compiler. It is a toolkit framework library coded for C++.
You need at least a C++11 compiler, like GCC (g++, at least 4.9) or Clang/LLVM (clang++)
You probably want to say that you don't need the QtCreator editor and IDE.
I'm trying to configure my Qt for Embedded Linux with a virtual framebuffer according to these instructions. From the Qt for Embedded source folder, I'm trying:
./configure -embedded -opensource -confirm-license -verbose -qvfb
make
I get the following error which prevents me from doing make install:
.obj/release-shared-emb-x86/qtextcodec.o: In function `setup()':
qtextcodec.cpp:(.text+0x23cc): undefined reference to `QIconvCodec::QIconvCodec()'
collect2: ld returned 1 exit status
make[1]: *** [../../lib/libQtCore.so.4.8.4] Error 1
make[1]: Leaving directory `/home/cstjean/qt/src/corelib'
make: *** [sub-corelib-all-ordered] Error 2
If I do:
./configure -embedded -opensource -confirm-license -verbose -qvfb
make -no-iconv
sudo make install -no-iconv
...This works. But when I go into QtCreator, Tools > Options > Build & Run > Qt Versions, I try to select qmake for Qt Embedded (for me it's in /home/cstjean/qt/bin/qmake) and it tells me:
Qt version is not properly installed, please run make install
I've tried googling this like crazy. There are a lot of suggestions to download various libraries, which I've tried to no avail, but perhaps I'm missing something because this is a pretty fresh installation of Ubuntu I'm using.
Thanks.
I solved this problem by installing Gnome and starting over from scratch for my Qt Embedded for Linux installation.
I googled gnome for ubuntu 12.04 and found these instructions. You'll have to see which version of Ubuntu you have and search for that of course. You can see which version you have by typing into a command line:
lsb_release -a
Once I had gnome installed, I restarted my computer and signed in using Gnome.
Then I completely uninstalled and removed all traces of Qt Embedded:
cd yourQtEmbeddedDir
sudo make uninstall
cd ..
rm -r yourQtEmbeddedDir sourceFileTarYouHadDownloaded.tar.gz
I redownloaded the source file tar for Qt Embedded for Linux (from here) and proceeded to install according to these instructions after extracting the source files from the tar:
./configure -embedded -opensource -confirm-license -verbose -qvfb
make
sudo make install
Now, if you tell QtCreator about qmake from this installation, then QtCreator will no longer complain about a bad installation! Ta da!
Note: If you're attempting to the do the Virtual Framebuffer business too, then this is not the end of the road. You need to have Qt for X11 installed as well in order to compile qvfb.
Long story short: You need Gnome if you're trying to install Qt Embedded for Linux with a Virtual Framebuffer on Ubuntu!