You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I downloaded the new version 2.4.0 and I tried to update my packages for MinGW and CYGWIN.
Unfortunately, I got some issues which blocked my builds.
(1) It seems that it has been added C90 as minimum dialect when compiling here:
but unfortunately there is this piece of code which blocks the process:
fluidsynth-2.4.0/src/utils/fluid_sys.c:1803:5: error: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
1803 | static char ascii_err[sizeof(err)];
| ^~~~~~
So, in my opinion the fastest way to fix this issue is to declare err[] and ascii_err[] with the same size, by using a macro.
(2) Fluidsynth now adds _UNICODE and UNICODE on the command line without chance to disable it.
Unfortunately, this is bad because it makes builds of Fluidsynth not working anymore when windows-version is set to 0x0400 and CYGWIN fails with this message:
fluidsynth-2.4.0/src/drivers/fluid_waveout.c:431:20: error: implicit declaration of function ‘wcsicmp’; did you mean ‘wcsncmp’? [-Werror=implicit-function-declaration]
431 | if(wcsicmp(lpwDevName, caps.szPname) == 0)
| ^~~~~~~
| wcsncmp
Actually, CYGWIN provides support for widechar but it is different from the one provided by MinGW and MSVC because wchar_t is 32bit as it is on GLibc for linux, for example. it supports wcscasecmp() instead.
In my opinion, it would be better to make an option like this one into CMakeLists.txt:
option ( enable-unicode "enable UNICODE build for Windows" on )
which is set to on by default, so it will work as it works now if it is not provided.
Later, testing enable-unicode will allow to add or not UNICODE for Windows and CYGWIN.
(3) I got a minor warning when building winmidi driver:
fluidsynth-2.4.0/src/drivers/fluid_winmidi.c:492:15: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long long unsigned int’ [-Wsign-compare]
492 | if (n >= sizeof(new_name))
| ^~
But hopefully, this is easy to fix since it is just needed to declare n as unsigned int instead of int.
I will provide patches for solving these problems if you want.
The text was updated successfully, but these errors were encountered:
Hello, I downloaded the new version 2.4.0 and I tried to update my packages for MinGW and CYGWIN.
Unfortunately, I got some issues which blocked my builds.
(1) It seems that it has been added C90 as minimum dialect when compiling here:
fluidsynth/CMakeLists.txt
Line 122 in 0a86368
but unfortunately there is this piece of code which blocks the process:
So, in my opinion the fastest way to fix this issue is to declare
err[]
andascii_err[]
with the same size, by using a macro.(2) Fluidsynth now adds
_UNICODE
andUNICODE
on the command line without chance to disable it.Unfortunately, this is bad because it makes builds of Fluidsynth not working anymore when
windows-version
is set to0x0400
and CYGWIN fails with this message:Actually, CYGWIN provides support for widechar but
it is different from the one provided by MinGW and MSVC becauseit supportswchar_t
is 32bit as it is on GLibc for linux, for example.wcscasecmp()
instead.In my opinion, it would be better to make an option like this one into CMakeLists.txt:
which is set to
on
by default, so it will work as it works now if it is not provided.Later, testing
enable-unicode
will allow to add or notUNICODE
for Windows and CYGWIN.(3) I got a minor warning when building winmidi driver:
But hopefully, this is easy to fix since it is just needed to declare
n
asunsigned int
instead ofint
.I will provide patches for solving these problems if you want.
The text was updated successfully, but these errors were encountered: