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

portaudio:fix compile error #559

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

gitdreambox
Copy link

  1. fix compile error , undefined reference to `Pa_Initialize'

link_libraries(${PORTAUDIO_LIBRARIES}) need to be added after add_library(btstack STATIC ${SOURCES})

build error:
$ make
[ 56%] Built target btstack
[ 56%] Linking C executable audio_duplex
F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0x381): undefined reference to Pa_Initialize' F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0x394): undefined reference to Pa_GetErrorText'
F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0x3d1): undefined reference to Pa_GetDefaultOutputDevice' F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0x3ec): undefined reference to Pa_GetDeviceInfo'
F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0x408): undefined reference to Pa_GetDeviceInfo' F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0x4aa): undefined reference to Pa_OpenStream'
F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0x4bd): undefined reference to Pa_GetErrorText' F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0x51b): undefined reference to Pa_GetStreamInfo'
F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0x5e1): undefined reference to Pa_Initialize' F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0x5f4): undefined reference to Pa_GetErrorText'
F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0x631): undefined reference to Pa_GetDefaultInputDevice' F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0x64c): undefined reference to Pa_GetDeviceInfo'
F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0x668): undefined reference to Pa_GetDeviceInfo' F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0x70b): undefined reference to Pa_OpenStream'
F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0x71e): undefined reference to Pa_GetErrorText' F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0x779): undefined reference to Pa_GetStreamInfo'
F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0x7e4): undefined reference to Pa_GetStreamInfo' F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0x813): undefined reference to Pa_GetStreamInfo'
F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0x8c4): undefined reference to Pa_StartStream' F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0x8d7): undefined reference to Pa_GetErrorText'
F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0x975): undefined reference to Pa_StartStream' F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0x988): undefined reference to Pa_GetErrorText'
F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0xa3b): undefined reference to Pa_StopStream' F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0xa4e): undefined reference to Pa_GetErrorText'
F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0xac8): undefined reference to Pa_StopStream' F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0xadb): undefined reference to Pa_GetErrorText'
F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0xb3a): undefined reference to Pa_Terminate' F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0xb4d): undefined reference to Pa_GetErrorText'
F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0xbbd): undefined reference to Pa_CloseStream' F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0xbd0): undefined reference to Pa_GetErrorText'
F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0xc42): undefined reference to Pa_CloseStream' F:/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libbtstack.a(btstack_audio_portaudio.c.obj):btstack_audio_portaudio.c:(.text+0xc55): undefined reference to Pa_GetErrorText'
collect2.exe: error: ld returned 1 exit status

@gitdreambox gitdreambox force-pushed the develop_fix_build_error_undefined_reference_portaudio branch from e704e87 to 22b3eb2 Compare February 7, 2024 06:43
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

Successfully merging this pull request may close these issues.

2 participants