Hi Luke
Using the project files supplied, and version 1.0.7, this is what I do to
compile under
windows:
a. In fluid_adriver.c comment out AUFILE_SUPPORT 1 (I'm not using it)
b. In fluidsynth.c comment out the include of fluid_lash.h
c. remove the top include of config.h. It occurs later.
d. when compiling as a .lib, must include the flag FLUIDSYNTH_NOT_A_DLL
In fluid_dsound.c
static HWND fluid_wnd = NULL;
is missing so it won't compile. It was there in 1.0.6
I've also attached a bug fix which I sent to Josh earlier which you
may need to implement to get it to run whin linked as a .lib.
stephen
sonance.org>
To: "Luke Palmer" <[EMAIL PROTECTED]>
Cc: <fluid-dev@nongnu.org>
Sent: Monday, December 04, 2006 12:04 PM
Subject: Re: [fluid-dev] Windows compilation
Hello Luke,
I don't currently build FluidSynth in Windows myself. Files with .a
and .la sound like binary archive files. Not sure what the 1.0.3
archive you downloaded contains. Those files aren't useful for building
the project though, but rather the product of building it.
I should really give building FluidSynth a try on Windows. If anyone
has any diffs or changes that would make life easier for those who are
building on that platform, do let me know.
Josh
On Sun, 2006-12-03 at 10:42 +0000, Luke Palmer wrote:
Hi everybody,
I'm trying to get a project I wrote working on Windows using Visual
Studio .NET. The windows version I downloaded (1.0.3) had .a and .la
files, which VS.NET doesn't grok (cygwin's preference, perhaps?).
Also, when trying to build it myself, the Fluidsynth LIB project was
corrupt and couldn't be opened.
Does anybody have experience with this problem? I'm not hacking on
fluidsynth, so if anybody has made fluidsynth.lib, that would suffice.
I'm not averse to putting in a little work to build it either.
Thanks,
Luke
_______________________________________________
fluid-dev mailing list
fluid-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/fluid-dev
These only relate to Windows implementation using dsound
BUG #1
When compiling as DLL, fluid_instance is initialized by calling
fluid_set_hinstance()
from DLLMain (fluid_dll.c)
However when compiled ad a .LIB it is never initialized so the check in
new_fluid_dsound_audio_driver() (fluid_dsound.c)
if (FLUID_HINSTANCE == NULL) {
FLUID_LOG(FLUID_ERR, "No hinstance needed for DirectSound");
return NULL;
}
will always fail.
Similarly, when compiling as a DLL, fluid_wnd is not initialized, and the test
if (fluid_wnd == NULL) {
if (fluid_win32_create_window() != 0) {
FLUID_LOG(FLUID_ERR, "Couldn't create window needed for DirectSound");
return NULL;
}
}
will always fail.
I'm sure there's a more elegant solution, but I just used ifdefs
#ifdef FLUIDSYNTH_NOT_A_DLL
if (fluid_wnd == NULL) {
if (fluid_win32_create_window() != 0) {
FLUID_LOG(FLUID_ERR, "Couldn't create window needed for DirectSound");
return NULL;
}
}
#else
if (FLUID_HINSTANCE == NULL) {
FLUID_LOG(FLUID_ERR, "No hinstance needed for DirectSound");
return NULL;
}
#endif
BUG #2
In fluid_dsound.c
static HWND fluid_wnd = NULL;
is missing so it won't compile. It was there in 1.0.6
_______________________________________________
fluid-dev mailing list
fluid-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/fluid-dev