fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[fluid-dev] [PATCH] Building fluidsynth with MSVC.NET 2003


From: Miguel Lobo
Subject: [fluid-dev] [PATCH] Building fluidsynth with MSVC.NET 2003
Date: Sat, 7 Apr 2007 16:43:32 +0200

Hi list,

Short story: please find attached a patch against current CVS that fixes various problems with the Win32 port, including:
* Execution bugs in the standalone executable and static library.
* A number of compiler errors and warnings with MSVC.NET.

Long story: a while ago I wrote to this list about my intention to use fluidsynth in a Linux/Windows pseudo-soundtracker I'm writing in Python.  The GUI is still in a very early state, but I thought I'd start writing the fluidsynth Python bindings so I can find any fundamental problems with my approach before it's too late.

Well, the first snag I've hit so far is compiling fluidsynth using the free MSVC.NET 2003 compiler.  I'm using this compiler because it's the same one the Python project uses for its Windows release and that makes things easier for me.

Some of the problems I've fixed or worked around are:
* autotools doesn't seem to support MSVC.  I solved this by using QMake (I have not included the QMake project file in my patch, but I can provide it if someone is interested).
* Some files included config.h without checking for HAVE_CONFIG_H; this does not work if you are not using the autotools.
* Part of the initialization necessary for the DirectSound driver had been moved to DllMain, so it was only executed in the DLL.  I've moved this back to the DirectSound driver.
* Command line argument processing was messed up if you don't have getopt; I hope my simple fix does not break anything.

I've also renamed fluid_dll.c to fluid_win32.c (as the code it contains is needed in Win32 even if you are not compiling a DLL), and created a fluid_win32.h header.

Finally, the biggest part of the patch actually consists of adding "extern" in front of all the function prototypes in the headers.  I did this because I mistakenly thought it was the cause of some compiler and linker warnings I was seeing.  Hopefully keeping those "extern" is a good idea anyway.

With this patch, the standalone executable and DLL build with MSVC.NET without any warnings, and I've also checked fluidsynth is able to play MIDI files.

Perhaps Josh or somebody can check my patch does not break the Linux build and then check it in the repository.

Thanks,
Miguel

Attachment: win32.patch.gz
Description: GNU Zip compressed data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]