Skip to content

Cannot build Fluidsynth with libsndfile on Windows. #1422

@carlo-bramini

Description

@carlo-bramini

Building Fluidsynth with support for libsndfile with MinGW stops with this error:

src/bindings/fluid_filerenderer.c:320:32: error: implicit declaration of function ‘sf_wchar_open’ [-Werror=implicit-function-declaration]
  320 |                 dev->sndfile = sf_wchar_open(wc_filename, SFM_WRITE, &info);
      |                                ^~~~~~~~~~~~~

According to the description inside sndfile.h, you must activate sf_wchar_open() by declaring ENABLE_SNDFILE_WINDOWS_PROTOTYPES somewhere:

/* The function sf_wchar_open() is Windows Only!
** Open a file passing in a Windows Unicode filename. Otherwise, this is
** the same as sf_open().
**
** In order for this to work, you need to do the following:
**
**		#include <windows.h>
**		#define ENABLE_SNDFILE_WINDOWS_PROTOTYPES 1
**		#including <sndfile.h>
*/

But this is missing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions