Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Msys2 Build #80

Open
PeteHaughie opened this issue Sep 21, 2024 · 1 comment
Open

Msys2 Build #80

PeteHaughie opened this issue Sep 21, 2024 · 1 comment

Comments

@PeteHaughie
Copy link

Has anyone ever managed to get this addon to build under msys2?

I've been banging my head against it for a couple of days now and I'm just about ready to give up.

@PeteHaughie
Copy link
Author

I've managed to get the build errors down to two but I can't seem to squash them.

C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/openFrameworks/addons/obj/msys2/Debug/ofxHapPlayer/libs/ofxHap/src/AudioResampler.o: in function `ofxHap::AudioResampler::AudioResampler(ofxHap::AudioParameters const&, int)':
C:/openFrameworks/addons/ofxHapPlayer/libs/ofxHap/src/AudioResampler.cpp:48:(.text+0xa2): undefined reference to `av_get_default_channel_layout'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/openFrameworks/addons/obj/msys2/Debug/ofxHapPlayer/libs/ofxHap/src/AudioResampler.o: in function `ofxHap::AudioResampler::resample(AVFrame const*, int, int, float*, int, int&, int&)':
C:/openFrameworks/addons/ofxHapPlayer/libs/ofxHap/src/AudioResampler.cpp:103:(.text+0x259): undefined reference to `swr_alloc_set_opts'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/openFrameworks/addons/ofxHapPlayer/libs/ofxHap/src/AudioResampler.cpp:113:(.text+0x271): undefined reference to `av_get_channel_layout_nb_channels'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/c/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:411: bin/example_debug.exe] Error 1
make[1]: Leaving directory '/c/openFrameworks/addons/ofxHapPlayer/example'
make: *** [/c/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:145: Debug] Error 2

I know that the rest of the libs are being included correctly because the errors have been dwindling one by one.

My config.make file has the following added lines:

PROJECT_LDFLAGS += -Wl,-rpath=../libs
PROJECT_LDFLAGS += -lswresample -lavutil -lavcodec -lavformat -lsnappy

I'm at my wit's end trying to understand why the AudioResampler.cpp file can't seem to see these functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant