Using MinGW to Compile PortAudio Examples with ASIO

I've been studying, "The Audio Programming Book." So far I can load audio files, apply various filters and analyses, and then save the result. Now, I want to start applying the filters live to me playing guitar. To do that I need near zero latency from my guitar-to-USB chord to the speakers. Using the default PortAudio build, I can use WMME or WASAPI to do live audio but there is about an eighth note worth of delay. The delay irritating and problematic. It has the same effect that the IPhone Speech Jammer App has. So WMME and WASAPI aren't good enough for my project.

So far what has somewhat worked for me, is the instructions given here:
https://www.assembla.com/spaces/portaudio/wiki/Notes_about_building_PortAudio_with_MinGW

I'm running MinGW (32-bit) on Windows 7. I prefer C++, but compiling with C or C++ is nearly identical in this case. First I got the ASIOSDK2.3 file from steinberg.net, then in the portaudio file with MSYS:
./configure --with-winapi=asio --with-asiodir=../ASIOSDK2.3
make

At this point I went into the C://portaudio/bin/ and tested a few of the example executables that were made during the, "make," command. They work fine. I see the ASIO icon on the bottom right of my screen, and I can open the ASIO settings panel just fine. Awesome! Home-free, or so I thought.

Before I tried compiling any files myself, I copied the libportaudio.a to C://mingw/lib, and the files in the C://portaudio/include folder to C://mingw/include. There was no dll to be found, even when I used the search bar.

To compile in MSYS I've tried and failed using:
gcc pa_devs.c -lportaudio -lwinmm -lole32 -lm

The, "-lwinmm -lole32 -lm," part is for some of the files linked from the ASIOSDK2.3.

The abridged compiler error message: pa_asio and several classes in the ASIOSDK2.3 had undefined references to vtable entries and functions like, "operator new(unsigned)," and, "operator delete(void*)."

A link to the full compiler error message:
http://textuploader.com/64bc

This is when I went back and took a closer look at the ./configure message. The feedback looked good to me. Here it is anyway, in case it helps:
http://textuploader.com/643j

Then the, "make," command feedback:
First half: http://textuploader.com/643h
Second half: http://textuploader.com/643x

The part that seems relevant:
*** Warning: linker path does not have real file for library -luuid.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libuuid and none of the candidates passed a file format test
*** using a file magic. Last file checked: c:/MinGW/lib/libuuid.a
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.

*** Since this library must not contain undefined symbols,
*** because either the platform does not support them or
*** it was explicitly requested with -no-undefined,
*** libtool will only create a static version of it.


So from that I conclude: I must either be missing a link to a library when I compile, or my installation of MinGW needs a different libuuid.a file. The libuuid.a is there but PortAudio didn't like it for some reason.

This problem has been my bane for some time. I hope you can help.
Last edited on
Topic archived. No new replies allowed.