On 03.04.2019 10:48 Robin Rowe wrote:
> > Which branch? master?
> > Which version of Visual Studio?
>
> git clone
https://github.com/fltk/fltk.git
> cd fltk
> mkdir build
> cd build
> cmake .. -A x64
>
> Visual Studio Community 2017 15.9.5
I tried your commandline above with VS Community 2017 and it worked w/o
issues. Admittedly, 451 warnings may seem like an issue, but these are
mostly MS-specific and other benign warnings. The build with `cmake
--build` resulted in 0 (zero) errors.
There must be something wrong with your installation of VS or maybe with
your cmake version. Sorry, I'm afraid I can't help further.
> Has issues building on Ubuntu too:
>
> [ 49%] Building CXX object
> src/CMakeFiles/fltk.dir/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx.o
> /home/rower/code/fltk/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx:29:10:
> fatal error: windows.h: No such file or directory
> #include <windows.h>
> ^~~~~~~~~~~
> compilation terminated.
This should never happen when building under Linux. What was your CMake
command line under Linux? Are you trying to cross-compile?
Note that `src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx' would only be
selected for compilation for Windows builds.
> $ uname -a
> Linux ubuntu 4.15.0-43-generic #46-Ubuntu SMP Thu Dec 6 14:45:28 UTC
> 2018 x86_64 x86_64 x86_64 GNU/Linux
> $ g++ --version
> g++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
>
> Solution?
Try `cmake ..' w/o any other command line switches which should select
the Linux default generator 'Unix Makefiles', or select the generator
explicitly with `-G "Unix Makefiles"' or for instance `-G Ninja'. Both
options work well for me.