Re: [Cs-dev] mingw build report
Date | 2005-07-31 03:40 |
From | Michael Gogins |
Subject | Re: [Cs-dev] mingw build report |
Attachments | portmidi.dev Makefile.win |
Csound5's SConstruct is not building the PortMidi library, it is building the pmidi library, which is a MIDI input plugin based on the PortMidi library. Building PortMidi with MinGW on Windows involves building several libraries and dlls, not just one: libportmidi.a, libporttime.a, libpm_dll.a and pm_dll.dll. There are READMEs that I vaguely recall following, especially Belinda Thom's Windows pm_win/README_WIN.txt, to create my own Dev-C++ project files to build these libraries, after which I copied the headers and binaries to /usr/local/include and /usr/local/lib. The pm_set_close_function symbol that you are missing is in pm_dll.dll. Even though Csound (that is, pmidi.dll) doesn't link with pm_dll.dll, pmidi.dll does link with libportmidi.a, which in turn links with pm_dll.dll. Hope this helps, Mike P.S. in future, we may wish to create targets in SConstruct for PortMidi, PortAudio, etc. since they have crummy build systems of their own. libsndfile however has an excellent build system, and the FLTK build system is at least adequate. -----Original Message----- From: iainduncan@telus.net Sent: Jul 30, 2005 10:02 PM To: csound-devel@lists.sourceforge.net Subject: [Cs-dev] mingw build report Good news is I got csound5 to build without portmidi, but portmidi is a problem. I did manage to build portmidi on mingw despite no mingw mention in their docs ( weird ) by using a makefile I found on line. I linked a dummy app against portmidi ok after doing this. But ... Using scons I get the following output ( typed in by hand, hope it's right ): g++ -shared -o -pmidi.dll InOut\pmidi.o -L. -L\usr\local\lib -L. -L. -LC:\utah\usr\mingw\lib -LC:\utah\usr\msys\1.0\local\lib -LC:\projects\csound5\cygwin_import_libs -LC:\utah\opt\pd-0.38-4-devel-2\bin -lsndfile -lportmidi -lporttime -lwinmm -W1m--out-implib,libpmidi.a -W1,--output-def,pmidi.def Creating library file: libpmidi.a ./libportmidi.a(pmwin.o)(.text+0x1b): In function 'pm_init': C:/WINDOWS/msys/1.0/mingw/portmidi/pm_win/pmwin.c:52: undefined reference to 'pm_set_close_funtion' collect2: ld returned 1 exit status scons: building terminated because of errors. scons: *** [pmidi.dll] Error 1 So, I'm confused. Why are Mike's path names appearing in there? Why is it trying to build libportmidi which I already built and copied into my mingw/lib file? ( As I did with libsndfile, which worked fine. ) I copied all my portmidi .h files to mingw/include and all my *.a and .dlls to mingw/lib and the .dll's to the csound5 directory just in case. If anyone can shed some light on this, that would be wonderful! Thanks iain ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/csound-devel |
Date | 2005-07-31 05:16 |
From | iainduncan@telus.net |
Subject | Re: [Cs-dev] mingw build report |
> Csound5's SConstruct is not building the PortMidi library, it is building the > pmidi library, which is a MIDI input plugin based on the PortMidi library. > > Building PortMidi with MinGW on Windows involves building several libraries > and dlls, not just one: libportmidi.a, libporttime.a, libpm_dll.a and > pm_dll.dll. There are READMEs that I vaguely recall following, especially > Belinda Thom's Windows pm_win/README_WIN.txt, to create my own Dev-C++ > project files to build these libraries, after which I copied the headers and > binaries to /usr/local/include and /usr/local/lib. > The pm_set_close_function symbol that you are missing is in pm_dll.dll. > > Even though Csound (that is, pmidi.dll) doesn't link with pm_dll.dll, > pmidi.dll does link with libportmidi.a, which in turn links with pm_dll.dll. Thanks Michael, that helped clear it up. I got it to work by copying pm_dll.dll into my csound5 source directory and adding an entry to custom.py to add the csound5 source directory to the lib path. What I don't understand is why it didn't work before, when I had the same file in my mingw/lib directory and that was already listed as a lib path by custom.py. Or for that matter, why it didn't find the file in the csound source directory before adding it to custom.py. So I've built with fltk and portmidi, but haven't tried csoundvst yet. I'm keeping notes though! Hopefully by the time I manage to build everything I can make an idiot's how to for windows. I'm not back on this windows machine for a while though, so it'll be later in the week that I continue. At least it's a good diversion at work. ;) Iain ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-07-31 11:22 |
From | Istvan Varga |
Subject | Re: [Cs-dev] mingw build report |
Michael Gogins wrote: > P.S. in future, we may wish to create targets in SConstruct > for PortMidi, PortAudio, etc. since they have crummy build > systems of their own. I think it would make sense to write a native MIDI plugin for MME (and possibly other platforms too, since PortMidi is generally the most difficult to build one of the Csound 5 dependencies, and it does not seem to be actively maintained). For PortAudio, I would prefer having a downloadable "PortAudio SDK" for Windows, including a portaudio.dll.0.0.19 file built with MSVC supporting all three major interfaces (MME, DirectSound, and ASIO), and the necessary header files (probably just portaudio.h) and import libraries for MSVC and MinGW. As PortAudio development does not seem to be very active, this package would not need to be updated frequently. SConstruct is already complicated enough without build targets for external libraries like PortAudio and PortMidi. ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |