Hi,
When you download raw source tree like in your example "libosmscout" there will be no configure script which is needed for configuration, but you'll find autogen.sh script..
autogen.sh file is used to expand configure script.
once you generate configure script with autogen you then execute configure script to configure.
Once configure script is done configuring you then run make followed by make install.
In order for all these tasks to be successful on Windows the very first thing you need to ensure is to have latest tools such as GNU autotools, compilers and utilities...
Here is how to obtain the latest GNU tools for windows:
Visit below page and follow install instructions:
https://msys2.github.io/
once you do this open the shell (either x32 bit or x64bit depending on your build type) located in MSYS2 installation directory and run following command (copy and paste into console and hit enter)
pacman -S make autoconf autogen automake intltool wget tar itstool bison pkg-config
At this point you can chose which compiler to use with MSYS2 as follows:
To use x64 bit Microsoft compiler and compile the code for Visual Studio, open x64 Visual Studio command prompt and run: (update paths as needed, depending on where you installed MSYS2)
1 2
|
cd path\to\MSYS2\dir
mingw64_shell.bat
|
To use Microsoft x86 compiler open x86 command prompt and run:
1 2
|
cd path\to\MSYS2\dir
mingw32_shell.bat
|
to use x86 GCC compiler and compile the code for GCC compiler run following from the MSYS2 shell:
pacman -S mingw-w64-i686-gcc
to use x64 bit GCC compiler run this:
pacman -S mingw-w64-x86_64-gcc
Now when you have all the tools you need open MSYS2 shell (again depending on your build type either
mingw32_shell.bat
or
mingw64_shell.bat
and cd into sources root directory and run:
NOTE, to use GCC just open one of the *.bat files, to use MSVC run one of the *.bat files from Visual Studio command prompt.
to compile with gcc run:
1 2 3 4 5
|
cd path/to/libosmscout/
./autogen.sh
./configure CC='gcc' CXX='g++'
make
make install
|
to configure and compile with MSVC run:
1 2 3 4 5
|
cd path/to/libosmscout/
./autogen.sh
./configure CC='cl' CXX='cl' LD=link AR=lib CPP='cl -nologo -EP' CXXCPP='cl -E'
make
make install
|
If there are any errors let us know, you might need to pass arguments to autogen.sh and configure scripts, but try to run as shown above first and see how it goes.
to learn which additional options you can pass to configure script run:
./configure --help
edit:
it is also possible to generate Visual Studio solution without using command prompts:
You do so by installing CMAKE
https://cmake.org/
1. run
cmake-gui from Visual Studio command prompt, and give input on where you download the sources, also give input on where to build.
2. click on configure button in cmake GUI (select Visual studio version when asked)
3. select generator and hit generate to generate VS solution
4. open solution and build.