Я пытаюсь установить fltk в Mingw-32 bit на Windows10.Я загружаю fltk-1.3.5 из здесь , распаковываю его, перехожу в папку и запускаю команду make
для его сборки.Но это дает мне следующую ошибку:
$ make
=== making jpeg ===
=== making zlib ===
=== making png ===
=== making src ===
=== making fluid ===
Compiling ExternalCodeEditor_WIN32.cxx...
ExternalCodeEditor_WIN32.cxx: In function ‘const char* get_ms_errmsg()’:
ExternalCodeEditor_WIN32.cxx:37:5: error: ‘_snprintf’ was not declared in this scope; did you mean ‘asnprintf’?
37 | _snprintf(emsg, sizeof(emsg), "Error Code %ld", long(lastErr));
| ^~~~~~~~~
| asnprintf
ExternalCodeEditor_WIN32.cxx: In function ‘int terminate_app(DWORD, DWORD)’:
ExternalCodeEditor_WIN32.cxx:116:60: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘DWORD’ {aka ‘unsigned int’} [-Wformat=]
116 | printf("WARNING: sent WIN_CLOSE, but timeout after %ld msecs.."
| ~~^
| |
| long int
| %d
117 | "trying TerminateProcess\n", msecTimeout);
| ~~~~~~~~~~~
| |
| DWORD {aka unsigned int}
ExternalCodeEditor_WIN32.cxx: In static member function ‘static const char* ExternalCodeEditor::tmpdir_name()’:
ExternalCodeEditor_WIN32.cxx:299:3: error: ‘_snprintf’ was not declared in this scope; did you mean ‘asnprintf’?
299 | _snprintf(dirname, sizeof(dirname), "%s.fluid-%ld",
| ^~~~~~~~~
| asnprintf
ExternalCodeEditor_WIN32.cxx: In member function ‘const char* ExternalCodeEditor::tmp_filename()’:
ExternalCodeEditor_WIN32.cxx:343:3: error: ‘_snprintf’ was not declared in this scope; did you mean ‘asnprintf’?
343 | _snprintf(path, sizeof(path), "%s\\%p%s", tmpdir, (void*)this, ext);
| ^~~~~~~~~
| asnprintf
ExternalCodeEditor_WIN32.cxx: In member function ‘int ExternalCodeEditor::start_editor(const char*, const char*)’:
ExternalCodeEditor_WIN32.cxx:422:3: error: ‘_snprintf’ was not declared in this scope; did you mean ‘asnprintf’?
422 | _snprintf(cmd, sizeof(cmd), "%s %s", editor_cmd, filename);
| ^~~~~~~~~
| asnprintf
make[1]: *** [../makeinclude:162: ExternalCodeEditor_WIN32.o] Error 1
make: *** [Makefile:24: all] Error 1
Аналогичная ошибка возникает на Mingw-64 бит.
Где проблема и как ее можно решить?
Редактировать: я попробовал метод, указанный @jacob в его ответе, но получил следующую ошибку:
$ cmake -G "MinGW Makefiles" -D CMAKE_MAKE_PROGRAM=mingw32-make ..
CMake Error: Could not create named generator MinGW Makefiles
Generators
* Unix Makefiles = Generates standard UNIX makefiles.
Ninja = Generates build.ninja files.
CodeBlocks - Ninja = Generates CodeBlocks project files.
CodeBlocks - Unix Makefiles = Generates CodeBlocks project files.
CodeLite - Ninja = Generates CodeLite project files.
CodeLite - Unix Makefiles = Generates CodeLite project files.
Sublime Text 2 - Ninja = Generates Sublime Text 2 project files.
Sublime Text 2 - Unix Makefiles
= Generates Sublime Text 2 project files.
Kate - Ninja = Generates Kate project files.
Kate - Unix Makefiles = Generates Kate project files.
Eclipse CDT4 - Ninja = Generates Eclipse CDT 4.0 project files.
Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files.