On 28.03.2018 19:56 schrieb sebastian:
> I am compiling the FLTK 1.3.4 on Windows 10 using the Cygwin environment.
> When making fluid, errors occurred when trying to compiling
> 'ExternalCodeEditor_WIN32.cxx':
>
> '_snprintf' was not declared in this scope
>
> What might be the problems here?
As others wrote already, editing the source and replacing _snprintf with
snprintf or fl_snprintf *might* help to get you further. However, the
"standard" build under Cygwin with ./configure + make will likely not work.
As Ian said, MinGW is more appropriate to build Windows applications
under Windows.
However, if you want to use Cygwin as your build environment, then there
are several options:
(1) To build "Cygwin" applications that depend on Cygwin1.dll and use
X11 as the GUI (you need a running X server) you must configure FLTK with
./configure --enable-x11 --enable-cygwin
This works and builds programs that will only run under Cygwin and to
distribute them you need a commercial Cygwin license.
(2) If you want to use Cygwin to build native, freely distributable
Windows applications that don't depend on Cygwin, then you must install
the MinGW-w64 cross compiler packages for 32-bit and/or 64-bit. The
configuration is a little more complicated but works for me:
(2a) To build 32-bit programs use:
LDFLAGS="-static-libgcc -static-libstdc++" ./configure
--host=i686-w64-mingw32
(2b) To build 64-bit programs use:
LDFLAGS="-static-libgcc -static-libstdc++" ./configure
--host=x86_64-w64-mingw32
Note the LDFLAGS definition: this is necessary. You may also want to
define CXXFLAGS and CFLAGS.