Coder Social home page Coder Social logo

Comments (5)

gordonklaus avatar gordonklaus commented on July 24, 2024 1

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.

gordonklaus avatar gordonklaus commented on July 24, 2024

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.

dh1tw avatar dh1tw commented on July 24, 2024

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.

Raraku avatar Raraku commented on July 24, 2024

I am having the exact same issue. I've added the location to the PKG_CONFIG_PATH but there's no difference

from portaudio.

gordonklaus avatar gordonklaus commented on July 24, 2024

I believe this issue was solved by @dh1tw's suggestion. If not, please re-open.

from portaudio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.