PortAudio / portaudio

PortAudio is a cross-platform, open-source C language library for real-time audio input and output.
Other
1.46k stars 304 forks source link

Need to update build docs for mingw-w64 and WASAPI on Windows 8.1 #426

Closed ad8e closed 2 years ago

ad8e commented 3 years ago

https://github.com/PortAudio/portaudio/wiki/Notes_about_building_PortAudio_with_MinGW "The MinGW distribution does not appear to ship with the correct headers for building WASAPI or WDM/KS. You might have better luck with MinGW-w64...At least one developer used to compile PA/WASAPI with MinGW" I don't have access to edit the wiki. (I don't know how github wiki permissions work.) Here were the successful steps I took:

  1. install mingw-w64 and cmake.
  2. add to PATH: C:\msys64\mingw64\bin;C:\msys64\usr\bin this makes cmake work on Windows, otherwise you get error messages
  3. run cmake-gui. (if you opened it before changing PATH, restart it.)
  4. select the portaudio folder as source folder. select a build folder (I chose portaudio/buildr). press configure
  5. I used cmake_build_type = Release. the flags I checked were exactly these: build_shared build_static disable_install unicode_build use_wasapi
  6. Press configure again, then generate. open up portaudio/buildr in mingw-w64 64-bit. run make. copy libportaudio.a and libportaudio.dll.a over to my mingw lib folder this was C:\msys64\mingw64\x86_64-w64-mingw32\lib
  7. Compile my own project, adding " -lole32 -static -lportaudio" to my command line I use a static build. for a dynamic build, use "-lportaudio.dll", and add portaudio.dll to your project's folder
Be-ing commented 3 years ago

All host APIs are building successfully with MinGW on both Windows and Ubuntu in #443.

RossBencina commented 2 years ago

@ad8e is this fixed for you now in 19.7?

ad8e commented 2 years ago

I looked at https://github.com/PortAudio/portaudio/wiki/Notes_about_building_PortAudio_with_MinGW and http://portaudio.com/docs/v19-doxydocs/compile_windows_mingw.html and neither is updated properly. (For example, mingw doesn't even exist anymore, mingw.org is 404.) I can produce the relevant edits if given wiki edit permissions, or just a staging area that you can copy from. The mingw-w64 support itself is fine, as Be-ing notes.

RossBencina commented 2 years ago

It appears that the mingw project is still alive. A comment here says that the mingw project has moved to https://osdn.net/projects/mingw/ which was updated 10 days ago. That osdn.net link says:

This is the official download site for the latest packages originating from the MinGW.OSDN Project, (formerly the MinGW.org Project; however, that domain is no longer associated with this project).

The wiki is just a staging area. I think we should have separate pages for MinGW and MinGW-64

You can submit edits to http://portaudio.com/docs/v19-doxydocs/compile_windows_mingw.html via pull requests to: /doc/src/tutorial/compile_windows_mingw.dox the documentation on the website is regenerated from there.

I recommend creating a new page compile_windows_mingw-64.dox for mingw-64