Comments (5)
I eventually tried to do this myself and ran into the same problem as @Raraku.
Getting this error:
$ go build .
# pkg-config --cflags -- portaudio-2.0
Package portaudio-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `portaudio-2.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'portaudio-2.0', required by 'virtual:world', not found
pkg-config: exit status 1
in spite of this working as expected:
$ pkg-config --cflags -- portaudio-2.0
-IC:/msys64/mingw64/include
I was able to solve the problem by installing mingw-w64-x86_64-pkg-config
:
pacman -S mingw-w64-x86_64-pkg-config
I have no idea why the pre-installed pkg-config did not work as expected.
from portaudio.
Hi Aidan,
I'm not using Windows but maybe I can help.
Is there not a way to install a pre-compiled PortAudio on MinGW? I see there are some package managers, but I don't know if there is a package for PortAudio.
I suspect you're missing a portaudio-2.0.pc
file for pkg-config. Mine (on macOS) exists at /usr/local/lib/pkgconfig/portaudio-2.0.pc
. I suppose /usr/local/lib/pkgconfig/
is the default path and doesn't need to be added to PKG_CONFIG_PATH
. It looks like this file is generated (from this) when you build PortAudio; otherwise you'll need to write it yourself.
You can run pkg-config portaudio-2.0 --libs --cflags
to check whether the .pc
file is found.
When looking at the file mentioned here I find that line 16 is contained in a multi line comment, so the fact that it is complaining makes no sense to me.
This is how cgo works: A magic comment preceding the import of pseudo-package C
.
from portaudio.
Hi Aidan,
Msys2 provides MinGW + Pacman, the Arch Package Manager. Through Pacman you can install most libraries, incl. portAudio.
Another option for running gcc on Windows is tdm-gcc. I also made good experience with tdm-gcc compiling cgo projects natively on Windows hosts.
For cross-compiling, feel free to fork and adjust remoteAudio-xcompile to your needs.
from portaudio.
I am having the exact same issue. I've added the location to the PKG_CONFIG_PATH but there's no difference
from portaudio.
I believe this issue was solved by @dh1tw's suggestion. If not, please re-open.
from portaudio.
Related Issues (20)
- Opening a stream with a framesPerBuffer of 0 causes a buffer underrun and a stutter HOT 1
- "Unknow Error" in MacOS Big Sur HOT 1
- Get nothing using OpenDefaultStream in the latest mac os Big Sur. HOT 1
- unable to open on a device HOT 6
- Does not appear to work with PipeWire HOT 3
- Running mp3 example with hajimehoshi/go-mp3 library HOT 5
- Playing Opus stream causes playback half speed HOT 3
- how can I use go get ? HOT 2
- GEt live audio from microphone HOT 2
- Resulting windows apps built with golang 1.17.5 crash on startup. HOT 1
- windows dll HOT 4
- MacOS compile Windows error HOT 2
- Example `play.go` not working correctly HOT 1
- "go install <your portaudio module>" doesn't work HOT 3
- play.go example aiff file sounds "strange" HOT 2
- How do I get microphone level? [HELP] HOT 2
- fatal error: checkptr: pointer arithmetic result points to invalid allocation HOT 7
- examples/record.go not working keep getting panice error
- The built binary file cannot run another Windows HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from portaudio.