how to compile Libsmscout Library on Windows? - c++

While I try to Run CMake for the Library https://github.com/Framstag/libosmscout
I get an Error on CMake Line 250
create_private_config("${CMAKE_CURRENT_BINARY_DIR}/privateinclude/osmscout/private/Config.h" "OSMScout")
error: Unknown CMake command "create_private_config .
OS: Windows 10 ; IDE: Qt Creator

From browsing the repository, it appears the error is occurring in the libosmscout/libosmscout/CMakeLists.txt file at line 250. CMake defines this function in libosmscout/cmake/features.cmake, a file which is included from the top-level CMake file. Try running CMake using the commands below, ensuring CMake starts from the root directory of the repository (same directory containing the appveyor.yml file):
cd C:/path/to/your/repo_root
mkdir build
cd build
cmake ..
The appveyor.yml file has some example configurations (e.g. Visual Studio 2015, x64) that have been tested with this project.

Related

How to build gstreamer from source code using meson?

OS: Windows 10
Compiler: gcc x86-64 8.1.0
I cloned repo:
git clone https://gitlab.freedesktop.org/gstreamer/gstreamer.git
Started meson:
meson \path\to\directory
And next start ninja
ninja
And I get error:
fatal error: glib.h: No such file or directory
I thought that everything what I need is in this repo. Am I wrong?
I guess meson outputs "glib2 not found".
You might need to install glib2.
And make sure glib-2.0.pc exists on "/usr/local/lib/pkgconfig" or $PKG_CONFIG_PATH dir.
meson search pkgconfig dir first for find out package.

`Could not find feature system-zlib` during building QT source code

I'm trying to build QT from source code in Windows.
I installed QT binary (5.12.8) to get qmake, the bin path is added to system environment.
I downloaded QT source code (qtbase only) tag v5.12.8 and unzip to d:\github\qtbase
I opened the vs native x64 cmd shell and run: qmake qtbase.pro
The output is like:
Support enabled for:
Using pkg-config ....................... no
udev ................................... no
Using system zlib ...................... no
.
.
.
Qt is now configured for building. Just run 'nmake'.
Once everything is built, you must run 'nmake install'.
Qt will be installed into 'C:\Qt\Qt5.12.8\5.12.8\msvc2017_64'.
then I run nmake but I had this error:
Project ERROR: Could not find feature system-zlib.
NMAKE : fatal error U1077: 'cd' : return code '0x3'
Stop.
From the config log above, system zlib is not used, I assume QT's internal zlib will be used.
I have checked my folder, \src\3rdparty\zlib\src is existed and zlib.h is there.
I'd like to know how to fix this error or disable zlib.
#AlanBirtles Thanks for the hint, I followed the official instructions and compiled again, it works.
In the official instruction, configure.bat is used instead of my direct use of qmake.
There is one more difference in my second try: I use the src code in C:\Qt\Qt5.12.8\5.12.8\Src, not the code from github in d:\github\qtbase.
The code in C:\Qt is downloaded during my installation of binary QT, because I checked the source code item in the installation.

CMake does not create make file [duplicate]

This question already has an answer here:
Why isn't the command "cmake ." generating a makefile? [closed]
(1 answer)
Closed 3 years ago.
I am using cmake to build the project. I am new to c++ so there can be mistakes as i am unaware of how it internally works.
When i run cmake command in build directory then the response does not give any error. The output is as shown in next image.image after cmake command
Now when i go to the test directory then i see these files.
image of test directory
As i already said i don't know how it internally works but following some online tutorials i expect that there should be a make file but i'm not getting that.
Any help would be great for as i am stucked in this setup from 3 days.
This is what is want to do next:
First, standard build files should be created from
these configuration files:
cd test/ && mkdir build && cd build,
cmake ..
Note that you have to run these commands only once. Next, you can use your platform’s native build tools
for the actual building:
make -j10
And train a single decision tree or bagging classifier with:
./DecisionTreeTest, and
./BaggingTest,
If you have Visual Studio 2019 you will want to run your cmake (from the build directory) as
cmake -G "Visual Studio 16 2019" ..
and you will get a new configuration and .sln generated in your build folder.
From there you can open the .sln in visual studio, or run (in your build directory)
cmake --build .
to begin compilation of a debug build or
cmake --build . --config Release
for a release build.

CMake zlib Dependency Error on Windows

I'm trying to build OpenEXR 2.2 on Windows, but the instructions that came with the download aren't working as expected. The instructions for IlmBase worked, but once I get to the OpenEXR instructions, it fails because of zlib. The steps at this point are:
3. Go to http://www.zlib.net and download zlib
So I went to this website and in the section that starts with: The current release is publicly available here: I downloaded zlib source code, version 1.2.8, zipfile format...
Then, I moved on to the next step, which is where I get the error:
4. Launch a command window, navigate to the OpenEXR folder with
CMakeLists.txt, and type command:
setlocal
del /f CMakeCache.txt
cmake
-DZLIB_ROOT=<zlib location>
-DILMBASE_PACKAGE_PREFIX=<where you installed the ilmbase builds>
-DCMAKE_INSTALL_PREFIX=<where you want to instal the openexr builds>
-G "Visual Studio 10 Win64" ^
..\openexr
So here's the command I type:
cmake -DZLIB_ROOT=C:\Users\erik\Documents\zlib-1.2.8 -DILMBASE_PACKAGE_PREFIX=C:\Users\erik\Documents\ilmbase-2.2.0\bin -DCMAKE_INSTALL_PREFIX=C:\Users\erik\Documents\ilmbase-2.2.0\bin -G "Visual Studio 10 Win64" ^..\openexr-2.2.0
And here's the error I get:
Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.8")
First problem is, the instructions don't say anything about ZLIB_LIBRARY. Second is, the zlib download looks like it's all source code. No .lib or .dll files are involved.
You have downloaded only the source code. You need to compile it first. Or download the pre-compiled DLL: "zlib compiled DLL" from the zlib homepage.
ZLIB_LIBRARY will be derived from ZLIB_DIR, so this part is correct.

Qt installation error

i got an error when am trying to configure Qt.
Erro :
execute: File or path is not found (nmake)
execute: File or path is not found (nmake)
Cleaning qmake failed, return code -1
// installion files.
InterBase...............no
Sources are in..............E:\xampp\Qt\4.6
Build is done in............E:\xampp\Qt\4.6
Install prefix..............E:\xampp\Qt\4.6
Headers installed to........E:\xampp\Qt\4.6\include
Libraries installed to......E:\xampp\Qt\4.6\lib
Plugins installed to........E:\xampp\Qt\4.6\plugins
Binaries installed to.......E:\xampp\Qt\4.6\bin
Docs installed to...........E:\xampp\Qt\4.6\doc
Data installed to...........E:\xampp\Qt\4.6
Translations installed to...E:\xampp\Qt\4.6\translations
Examples installed to.......E:\xampp\Qt\4.6\examples
Demos installed to..........E:\xampp\Qt\4.6\demos
Creating qmake...
execute: File or path is not found (nmake)
execute: File or path is not found (nmake)
Cleaning qmake failed, return code -1
E:\xampp\Qt\4.6>
If you are trying to build Qt with a Visual Studio enviroment, you have to make sure that nmake and cl are in the PATH.
The easiest way to do that is to simply use the Visual Studio Command Prompt (found e.g. in the start menu).
You need to change your path so that it leads to wherever nmake is.
Try adding the flag "-make nmake" to your configure command.