Csound Csound-dev Csound-tekno Search About

[Csnd] Csound on iOS - cannot build

Date2024-02-27 16:51
FromTarmo Johannes
Subject[Csnd] Csound on iOS - cannot build
Hi!

I am back to try to learn how to use Csound API on  iOS.
The Examples project works, but when I am following the instructions on:
to create my own Xcode project

everything goes fine until when building the app. The error reported is:

Undefined symbols for architecture arm64:

  "_vDSP_create_fftsetup", referenced from:

      _csoundRealFFT2Setup in libcsound.a(fftlib.o)

  "_vDSP_destroy_fftsetup", referenced from:

      _setupDispose in libcsound.a(fftlib.o)

  "_vDSP_fft_zrip", referenced from:

      _csoundRealFFT2 in libcsound.a(fftlib.o)

      _vDSP_DCT_execute in libcsound.a(fftlib.o)

ld: symbol(s) not found for architecture arm64




For any case I copy the linker command below.


I had the same when I was trying to link a Qt C++ project against libcsound.a

When I checked libcsound.a to see which symbols are in there:

 nm -a /Users/tarmojohannes/Documents/src/csound-iOS-6.18.0/Csound\ iOS\ Obj-C\ Examples/csound-iOS/libs/libcsound.a | grep _vDSP 


it seems to be correct:

---------------- T _vDSP_DCT_execute

                 U _vDSP_create_fftsetup

                 U _vDSP_destroy_fftsetup

                 U _vDSP_fft_zrip



I did not find out how to check about the architecture.

This is the official csound-ios-6.18.0 package downloaded from Csound web site.

I tried also to build the iOS folder from sources myself but it failed, since weather the option

-T buildsystem=1 

bothered make or without it I got error:




CMake Error in CMakeLists.txt:

  The custom command generating


    /Users/tarmojohannes/Documents/src/csound-6.18.1/iOS/cs6iOS/csound_orclex.c


  is attached to multiple targets:


    CsoundLib

    CsoundLib-static


  but none of these is a common dependency of the other(s).  This is not

  allowed by the Xcode "new build system".


I had the same problem some months ago and then gave up. Can someone who knows more about the iOS development test the libcsound library?

The strange thing is that the demo project builds, so there might be some flags or settings I cannot guess that must be given..


Thanks!
tarmo

---

Linker command in Xcode () project:

Ld /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos/csound-ios-xcode-test.app/csound-ios-xcode-test normal (in target 'csound-ios-xcode-test' from project 'csound-ios-xcode-test')

    cd /Users/tarmojohannes/Documents/src/csound-ios-xcode-test

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios16.2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -L/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/EagerLinkingTBDs -L/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos -L/Users/tarmojohannes/Documents/src/csound-ios-xcode-test/csound-iOS/libs -F/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/EagerLinkingTBDs -F/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos -filelist /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/csound-ios-xcode-test.build/Debug-iphoneos/csound-ios-xcode-test.build/Objects-normal/arm64/csound-ios-xcode-test.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/csound-ios-xcode-test.build/Debug-iphoneos/csound-ios-xcode-test.build/Objects-normal/arm64/csound-ios-xcode-test_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -lcsound -lsndfile -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/csound-ios-xcode-test.build/Debug-iphoneos/csound-ios-xcode-test.build/Objects-normal/arm64/csound-ios-xcode-test_dependency_info.dat -o /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos/csound-ios-xcode-test.app/csound-ios-xcode-test



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2024-02-27 16:53
FromRory Walsh
SubjectRe: [Csnd] Csound on iOS - cannot build
I never tried the public release of the iOS library. I have always built my own. I can email you a link to the library I am using if you like? 

On Tue, 27 Feb 2024 at 16:52, Tarmo Johannes <trmjhnns@gmail.com> wrote:
Hi!

I am back to try to learn how to use Csound API on  iOS.
The Examples project works, but when I am following the instructions on:
to create my own Xcode project

everything goes fine until when building the app. The error reported is:

Undefined symbols for architecture arm64:

  "_vDSP_create_fftsetup", referenced from:

      _csoundRealFFT2Setup in libcsound.a(fftlib.o)

  "_vDSP_destroy_fftsetup", referenced from:

      _setupDispose in libcsound.a(fftlib.o)

  "_vDSP_fft_zrip", referenced from:

      _csoundRealFFT2 in libcsound.a(fftlib.o)

      _vDSP_DCT_execute in libcsound.a(fftlib.o)

ld: symbol(s) not found for architecture arm64




For any case I copy the linker command below.


I had the same when I was trying to link a Qt C++ project against libcsound.a

When I checked libcsound.a to see which symbols are in there:

 nm -a /Users/tarmojohannes/Documents/src/csound-iOS-6.18.0/Csound\ iOS\ Obj-C\ Examples/csound-iOS/libs/libcsound.a | grep _vDSP 


it seems to be correct:

---------------- T _vDSP_DCT_execute

                 U _vDSP_create_fftsetup

                 U _vDSP_destroy_fftsetup

                 U _vDSP_fft_zrip



I did not find out how to check about the architecture.

This is the official csound-ios-6.18.0 package downloaded from Csound web site.

I tried also to build the iOS folder from sources myself but it failed, since weather the option

-T buildsystem=1 

bothered make or without it I got error:




CMake Error in CMakeLists.txt:

  The custom command generating


    /Users/tarmojohannes/Documents/src/csound-6.18.1/iOS/cs6iOS/csound_orclex.c


  is attached to multiple targets:


    CsoundLib

    CsoundLib-static


  but none of these is a common dependency of the other(s).  This is not

  allowed by the Xcode "new build system".


I had the same problem some months ago and then gave up. Can someone who knows more about the iOS development test the libcsound library?

The strange thing is that the demo project builds, so there might be some flags or settings I cannot guess that must be given..


Thanks!
tarmo

---

Linker command in Xcode () project:

Ld /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos/csound-ios-xcode-test.app/csound-ios-xcode-test normal (in target 'csound-ios-xcode-test' from project 'csound-ios-xcode-test')

    cd /Users/tarmojohannes/Documents/src/csound-ios-xcode-test

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios16.2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -L/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/EagerLinkingTBDs -L/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos -L/Users/tarmojohannes/Documents/src/csound-ios-xcode-test/csound-iOS/libs -F/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/EagerLinkingTBDs -F/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos -filelist /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/csound-ios-xcode-test.build/Debug-iphoneos/csound-ios-xcode-test.build/Objects-normal/arm64/csound-ios-xcode-test.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/csound-ios-xcode-test.build/Debug-iphoneos/csound-ios-xcode-test.build/Objects-normal/arm64/csound-ios-xcode-test_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -lcsound -lsndfile -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/csound-ios-xcode-test.build/Debug-iphoneos/csound-ios-xcode-test.build/Objects-normal/arm64/csound-ios-xcode-test_dependency_info.dat -o /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos/csound-ios-xcode-test.app/csound-ios-xcode-test



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2024-02-27 17:08
FromTarmo Johannes
SubjectRe: [Csnd] Csound on iOS - cannot build
Hi Rory, 

Yes, please send a link to your library!

Thanks!
Tarmo

T, 27. veebruar 2024 18:57 Rory Walsh <rorywalsh@ear.ie> kirjutas:
I never tried the public release of the iOS library. I have always built my own. I can email you a link to the library I am using if you like? 

On Tue, 27 Feb 2024 at 16:52, Tarmo Johannes <trmjhnns@gmail.com> wrote:
Hi!

I am back to try to learn how to use Csound API on  iOS.
The Examples project works, but when I am following the instructions on:
to create my own Xcode project

everything goes fine until when building the app. The error reported is:

Undefined symbols for architecture arm64:

  "_vDSP_create_fftsetup", referenced from:

      _csoundRealFFT2Setup in libcsound.a(fftlib.o)

  "_vDSP_destroy_fftsetup", referenced from:

      _setupDispose in libcsound.a(fftlib.o)

  "_vDSP_fft_zrip", referenced from:

      _csoundRealFFT2 in libcsound.a(fftlib.o)

      _vDSP_DCT_execute in libcsound.a(fftlib.o)

ld: symbol(s) not found for architecture arm64




For any case I copy the linker command below.


I had the same when I was trying to link a Qt C++ project against libcsound.a

When I checked libcsound.a to see which symbols are in there:

 nm -a /Users/tarmojohannes/Documents/src/csound-iOS-6.18.0/Csound\ iOS\ Obj-C\ Examples/csound-iOS/libs/libcsound.a | grep _vDSP 


it seems to be correct:

---------------- T _vDSP_DCT_execute

                 U _vDSP_create_fftsetup

                 U _vDSP_destroy_fftsetup

                 U _vDSP_fft_zrip



I did not find out how to check about the architecture.

This is the official csound-ios-6.18.0 package downloaded from Csound web site.

I tried also to build the iOS folder from sources myself but it failed, since weather the option

-T buildsystem=1 

bothered make or without it I got error:




CMake Error in CMakeLists.txt:

  The custom command generating


    /Users/tarmojohannes/Documents/src/csound-6.18.1/iOS/cs6iOS/csound_orclex.c


  is attached to multiple targets:


    CsoundLib

    CsoundLib-static


  but none of these is a common dependency of the other(s).  This is not

  allowed by the Xcode "new build system".


I had the same problem some months ago and then gave up. Can someone who knows more about the iOS development test the libcsound library?

The strange thing is that the demo project builds, so there might be some flags or settings I cannot guess that must be given..


Thanks!
tarmo

---

Linker command in Xcode () project:

Ld /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos/csound-ios-xcode-test.app/csound-ios-xcode-test normal (in target 'csound-ios-xcode-test' from project 'csound-ios-xcode-test')

    cd /Users/tarmojohannes/Documents/src/csound-ios-xcode-test

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios16.2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -L/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/EagerLinkingTBDs -L/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos -L/Users/tarmojohannes/Documents/src/csound-ios-xcode-test/csound-iOS/libs -F/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/EagerLinkingTBDs -F/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos -filelist /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/csound-ios-xcode-test.build/Debug-iphoneos/csound-ios-xcode-test.build/Objects-normal/arm64/csound-ios-xcode-test.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/csound-ios-xcode-test.build/Debug-iphoneos/csound-ios-xcode-test.build/Objects-normal/arm64/csound-ios-xcode-test_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -lcsound -lsndfile -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/csound-ios-xcode-test.build/Debug-iphoneos/csound-ios-xcode-test.build/Objects-normal/arm64/csound-ios-xcode-test_dependency_info.dat -o /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos/csound-ios-xcode-test.app/csound-ios-xcode-test



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2024-02-27 17:09
FromGiovanni Bedetti
SubjectRe: [Csnd] Csound on iOS - cannot build
Hi Tarmo,
a CsoundUnity user had the same issue some time ago, check this post:

https://forum.cabbageaudio.com/t/csound-unity-ios-build-failure/3484/11

Long story short, you need to add the Accelerate framework!



Il giorno mar 27 feb 2024 alle ore 17:57 Rory Walsh <rorywalsh@ear.ie> ha scritto:
I never tried the public release of the iOS library. I have always built my own. I can email you a link to the library I am using if you like? 

On Tue, 27 Feb 2024 at 16:52, Tarmo Johannes <trmjhnns@gmail.com> wrote:
Hi!

I am back to try to learn how to use Csound API on  iOS.
The Examples project works, but when I am following the instructions on:
to create my own Xcode project

everything goes fine until when building the app. The error reported is:

Undefined symbols for architecture arm64:

  "_vDSP_create_fftsetup", referenced from:

      _csoundRealFFT2Setup in libcsound.a(fftlib.o)

  "_vDSP_destroy_fftsetup", referenced from:

      _setupDispose in libcsound.a(fftlib.o)

  "_vDSP_fft_zrip", referenced from:

      _csoundRealFFT2 in libcsound.a(fftlib.o)

      _vDSP_DCT_execute in libcsound.a(fftlib.o)

ld: symbol(s) not found for architecture arm64




For any case I copy the linker command below.


I had the same when I was trying to link a Qt C++ project against libcsound.a

When I checked libcsound.a to see which symbols are in there:

 nm -a /Users/tarmojohannes/Documents/src/csound-iOS-6.18.0/Csound\ iOS\ Obj-C\ Examples/csound-iOS/libs/libcsound.a | grep _vDSP 


it seems to be correct:

---------------- T _vDSP_DCT_execute

                 U _vDSP_create_fftsetup

                 U _vDSP_destroy_fftsetup

                 U _vDSP_fft_zrip



I did not find out how to check about the architecture.

This is the official csound-ios-6.18.0 package downloaded from Csound web site.

I tried also to build the iOS folder from sources myself but it failed, since weather the option

-T buildsystem=1 

bothered make or without it I got error:




CMake Error in CMakeLists.txt:

  The custom command generating


    /Users/tarmojohannes/Documents/src/csound-6.18.1/iOS/cs6iOS/csound_orclex.c


  is attached to multiple targets:


    CsoundLib

    CsoundLib-static


  but none of these is a common dependency of the other(s).  This is not

  allowed by the Xcode "new build system".


I had the same problem some months ago and then gave up. Can someone who knows more about the iOS development test the libcsound library?

The strange thing is that the demo project builds, so there might be some flags or settings I cannot guess that must be given..


Thanks!
tarmo

---

Linker command in Xcode () project:

Ld /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos/csound-ios-xcode-test.app/csound-ios-xcode-test normal (in target 'csound-ios-xcode-test' from project 'csound-ios-xcode-test')

    cd /Users/tarmojohannes/Documents/src/csound-ios-xcode-test

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios16.2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -L/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/EagerLinkingTBDs -L/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos -L/Users/tarmojohannes/Documents/src/csound-ios-xcode-test/csound-iOS/libs -F/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/EagerLinkingTBDs -F/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos -filelist /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/csound-ios-xcode-test.build/Debug-iphoneos/csound-ios-xcode-test.build/Objects-normal/arm64/csound-ios-xcode-test.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/csound-ios-xcode-test.build/Debug-iphoneos/csound-ios-xcode-test.build/Objects-normal/arm64/csound-ios-xcode-test_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -lcsound -lsndfile -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/csound-ios-xcode-test.build/Debug-iphoneos/csound-ios-xcode-test.build/Objects-normal/arm64/csound-ios-xcode-test_dependency_info.dat -o /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos/csound-ios-xcode-test.app/csound-ios-xcode-test



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2024-02-27 21:25
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Csound on iOS - cannot build
The Accelerate framework is missing from your build. Because libcsound.a is static, you need to add all iOS dependencies when linking to it.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 27 Feb 2024, at 16:52, Tarmo Johannes <trmjhnns@gmail.com> wrote:



*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.

Hi!

I am back to try to learn how to use Csound API on  iOS.
The Examples project works, but when I am following the instructions on:
to create my own Xcode project

everything goes fine until when building the app. The error reported is:

Undefined symbols for architecture arm64:

  "_vDSP_create_fftsetup", referenced from:

      _csoundRealFFT2Setup in libcsound.a(fftlib.o)

  "_vDSP_destroy_fftsetup", referenced from:

      _setupDispose in libcsound.a(fftlib.o)

  "_vDSP_fft_zrip", referenced from:

      _csoundRealFFT2 in libcsound.a(fftlib.o)

      _vDSP_DCT_execute in libcsound.a(fftlib.o)

ld: symbol(s) not found for architecture arm64




For any case I copy the linker command below.


I had the same when I was trying to link a Qt C++ project against libcsound.a

When I checked libcsound.a to see which symbols are in there:

 nm -a /Users/tarmojohannes/Documents/src/csound-iOS-6.18.0/Csound\ iOS\ Obj-C\ Examples/csound-iOS/libs/libcsound.a | grep _vDSP 


it seems to be correct:

---------------- T _vDSP_DCT_execute

                 U _vDSP_create_fftsetup

                 U _vDSP_destroy_fftsetup

                 U _vDSP_fft_zrip



I did not find out how to check about the architecture.

This is the official csound-ios-6.18.0 package downloaded from Csound web site.

I tried also to build the iOS folder from sources myself but it failed, since weather the option

-T buildsystem=1 

bothered make or without it I got error:




CMake Error in CMakeLists.txt:

  The custom command generating


    /Users/tarmojohannes/Documents/src/csound-6.18.1/iOS/cs6iOS/csound_orclex.c


  is attached to multiple targets:


    CsoundLib

    CsoundLib-static


  but none of these is a common dependency of the other(s).  This is not

  allowed by the Xcode "new build system".


I had the same problem some months ago and then gave up. Can someone who knows more about the iOS development test the libcsound library?

The strange thing is that the demo project builds, so there might be some flags or settings I cannot guess that must be given..


Thanks!
tarmo

---

Linker command in Xcode () project:

Ld /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos/csound-ios-xcode-test.app/csound-ios-xcode-test normal (in target 'csound-ios-xcode-test' from project 'csound-ios-xcode-test')

    cd /Users/tarmojohannes/Documents/src/csound-ios-xcode-test

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios16.2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -L/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/EagerLinkingTBDs -L/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos -L/Users/tarmojohannes/Documents/src/csound-ios-xcode-test/csound-iOS/libs -F/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/EagerLinkingTBDs -F/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos -filelist /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/csound-ios-xcode-test.build/Debug-iphoneos/csound-ios-xcode-test.build/Objects-normal/arm64/csound-ios-xcode-test.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/csound-ios-xcode-test.build/Debug-iphoneos/csound-ios-xcode-test.build/Objects-normal/arm64/csound-ios-xcode-test_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -lcsound -lsndfile -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/csound-ios-xcode-test.build/Debug-iphoneos/csound-ios-xcode-test.build/Objects-normal/arm64/csound-ios-xcode-test_dependency_info.dat -o /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos/csound-ios-xcode-test.app/csound-ios-xcode-test



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2024-02-28 12:17
FromTarmo Johannes
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Csound on iOS - cannot build
AttachmentsScreenshot 2024-02-28 at 14.13.11.png  
Thank you, Giovanni, Victor!

That was it! Including Accelerate Framework did the trick and I got the project building. 

Screenshot 2024-02-28 at 14.13.11.png


Without the hint I would really never ever have guessed it. I suggest some lines in the documentation (csound_ios_manual.pdf 2.3 Getting started with Your Own Project) about it would be absolutely in place.

Next step is to try it make it happen also in a Qt project.

Best!
Tarmo





Kontakt Victor Lazzarini (<Victor.Lazzarini@mu.ie>) kirjutas kuupäeval T, 27. veebruar 2024 kell 23:25:
The Accelerate framework is missing from your build. Because libcsound.a is static, you need to add all iOS dependencies when linking to it.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 27 Feb 2024, at 16:52, Tarmo Johannes <trmjhnns@gmail.com> wrote:



*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.

Hi!

I am back to try to learn how to use Csound API on  iOS.
The Examples project works, but when I am following the instructions on:
to create my own Xcode project

everything goes fine until when building the app. The error reported is:

Undefined symbols for architecture arm64:

  "_vDSP_create_fftsetup", referenced from:

      _csoundRealFFT2Setup in libcsound.a(fftlib.o)

  "_vDSP_destroy_fftsetup", referenced from:

      _setupDispose in libcsound.a(fftlib.o)

  "_vDSP_fft_zrip", referenced from:

      _csoundRealFFT2 in libcsound.a(fftlib.o)

      _vDSP_DCT_execute in libcsound.a(fftlib.o)

ld: symbol(s) not found for architecture arm64




For any case I copy the linker command below.


I had the same when I was trying to link a Qt C++ project against libcsound.a

When I checked libcsound.a to see which symbols are in there:

 nm -a /Users/tarmojohannes/Documents/src/csound-iOS-6.18.0/Csound\ iOS\ Obj-C\ Examples/csound-iOS/libs/libcsound.a | grep _vDSP 


it seems to be correct:

---------------- T _vDSP_DCT_execute

                 U _vDSP_create_fftsetup

                 U _vDSP_destroy_fftsetup

                 U _vDSP_fft_zrip



I did not find out how to check about the architecture.

This is the official csound-ios-6.18.0 package downloaded from Csound web site.

I tried also to build the iOS folder from sources myself but it failed, since weather the option

-T buildsystem=1 

bothered make or without it I got error:




CMake Error in CMakeLists.txt:

  The custom command generating


    /Users/tarmojohannes/Documents/src/csound-6.18.1/iOS/cs6iOS/csound_orclex.c


  is attached to multiple targets:


    CsoundLib

    CsoundLib-static


  but none of these is a common dependency of the other(s).  This is not

  allowed by the Xcode "new build system".


I had the same problem some months ago and then gave up. Can someone who knows more about the iOS development test the libcsound library?

The strange thing is that the demo project builds, so there might be some flags or settings I cannot guess that must be given..


Thanks!
tarmo

---

Linker command in Xcode () project:

Ld /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos/csound-ios-xcode-test.app/csound-ios-xcode-test normal (in target 'csound-ios-xcode-test' from project 'csound-ios-xcode-test')

    cd /Users/tarmojohannes/Documents/src/csound-ios-xcode-test

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios16.2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -L/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/EagerLinkingTBDs -L/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos -L/Users/tarmojohannes/Documents/src/csound-ios-xcode-test/csound-iOS/libs -F/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/EagerLinkingTBDs -F/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos -filelist /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/csound-ios-xcode-test.build/Debug-iphoneos/csound-ios-xcode-test.build/Objects-normal/arm64/csound-ios-xcode-test.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/csound-ios-xcode-test.build/Debug-iphoneos/csound-ios-xcode-test.build/Objects-normal/arm64/csound-ios-xcode-test_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -lcsound -lsndfile -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/csound-ios-xcode-test.build/Debug-iphoneos/csound-ios-xcode-test.build/Objects-normal/arm64/csound-ios-xcode-test_dependency_info.dat -o /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos/csound-ios-xcode-test.app/csound-ios-xcode-test



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2024-02-29 15:03
FromTarmo Johannes
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Csound on iOS - cannot build
AttachmentsScreenshot 2024-02-28 at 14.13.11.png  
Hi!

I need another hint from people understanding Csound on iOS.

It is said in the documentation that in the code also Csound C-API can be used. Yes, it builds, also with the C++ API (including Csound.hpp) with no errors and seems to work but there is no audio output. How to deal with that?

Snippet of the testing code:

std::string orc = "sr=44100\n\
        ksmps=32\n\
        nchnls=2\n\
        0dbfs=1\n\
\n\
        instr 1\n\
        aout vco2 0.5, 440\n\
        outs aout, aout\n\
                endin";

    std::string sco = "i1 0 1";

    Csound* csound = new Csound();
    csound->SetOption("-odac");
    csound->CompileOrc(orc.c_str());
    csound->ReadScore(sco.c_str());
    csound->Start();
    csound->Perform();
    delete csound;


That gives warning

unknown rtaudio module: 'portaudio', using dummy module


It is understandable since  usually portaudio, auhal and other audio modules are used as plugins that probably are not built and included in libcsound.a 


I don't want to use Objective C since I am working on preparing a cross platform Csound App template, based on Qt C++/QML framework, that makes it relatively easy to build an app for all major platforms from the same code.


What do you suggest? Is there hope to achieve that?


Thanks!

tarmo




Kontakt Tarmo Johannes (<trmjhnns@gmail.com>) kirjutas kuupäeval K, 28. veebruar 2024 kell 14:17:
Thank you, Giovanni, Victor!

That was it! Including Accelerate Framework did the trick and I got the project building. 

Screenshot 2024-02-28 at 14.13.11.png


Without the hint I would really never ever have guessed it. I suggest some lines in the documentation (csound_ios_manual.pdf 2.3 Getting started with Your Own Project) about it would be absolutely in place.

Next step is to try it make it happen also in a Qt project.

Best!
Tarmo





Kontakt Victor Lazzarini (<Victor.Lazzarini@mu.ie>) kirjutas kuupäeval T, 27. veebruar 2024 kell 23:25:
The Accelerate framework is missing from your build. Because libcsound.a is static, you need to add all iOS dependencies when linking to it.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 27 Feb 2024, at 16:52, Tarmo Johannes <trmjhnns@gmail.com> wrote:



*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.

Hi!

I am back to try to learn how to use Csound API on  iOS.
The Examples project works, but when I am following the instructions on:
to create my own Xcode project

everything goes fine until when building the app. The error reported is:

Undefined symbols for architecture arm64:

  "_vDSP_create_fftsetup", referenced from:

      _csoundRealFFT2Setup in libcsound.a(fftlib.o)

  "_vDSP_destroy_fftsetup", referenced from:

      _setupDispose in libcsound.a(fftlib.o)

  "_vDSP_fft_zrip", referenced from:

      _csoundRealFFT2 in libcsound.a(fftlib.o)

      _vDSP_DCT_execute in libcsound.a(fftlib.o)

ld: symbol(s) not found for architecture arm64




For any case I copy the linker command below.


I had the same when I was trying to link a Qt C++ project against libcsound.a

When I checked libcsound.a to see which symbols are in there:

 nm -a /Users/tarmojohannes/Documents/src/csound-iOS-6.18.0/Csound\ iOS\ Obj-C\ Examples/csound-iOS/libs/libcsound.a | grep _vDSP 


it seems to be correct:

---------------- T _vDSP_DCT_execute

                 U _vDSP_create_fftsetup

                 U _vDSP_destroy_fftsetup

                 U _vDSP_fft_zrip



I did not find out how to check about the architecture.

This is the official csound-ios-6.18.0 package downloaded from Csound web site.

I tried also to build the iOS folder from sources myself but it failed, since weather the option

-T buildsystem=1 

bothered make or without it I got error:




CMake Error in CMakeLists.txt:

  The custom command generating


    /Users/tarmojohannes/Documents/src/csound-6.18.1/iOS/cs6iOS/csound_orclex.c


  is attached to multiple targets:


    CsoundLib

    CsoundLib-static


  but none of these is a common dependency of the other(s).  This is not

  allowed by the Xcode "new build system".


I had the same problem some months ago and then gave up. Can someone who knows more about the iOS development test the libcsound library?

The strange thing is that the demo project builds, so there might be some flags or settings I cannot guess that must be given..


Thanks!
tarmo

---

Linker command in Xcode () project:

Ld /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos/csound-ios-xcode-test.app/csound-ios-xcode-test normal (in target 'csound-ios-xcode-test' from project 'csound-ios-xcode-test')

    cd /Users/tarmojohannes/Documents/src/csound-ios-xcode-test

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios16.2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -L/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/EagerLinkingTBDs -L/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos -L/Users/tarmojohannes/Documents/src/csound-ios-xcode-test/csound-iOS/libs -F/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/EagerLinkingTBDs -F/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos -filelist /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/csound-ios-xcode-test.build/Debug-iphoneos/csound-ios-xcode-test.build/Objects-normal/arm64/csound-ios-xcode-test.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/csound-ios-xcode-test.build/Debug-iphoneos/csound-ios-xcode-test.build/Objects-normal/arm64/csound-ios-xcode-test_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -lcsound -lsndfile -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/csound-ios-xcode-test.build/Debug-iphoneos/csound-ios-xcode-test.build/Objects-normal/arm64/csound-ios-xcode-test_dependency_info.dat -o /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos/csound-ios-xcode-test.app/csound-ios-xcode-test



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2024-02-29 16:55
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Csound on iOS - cannot build
AttachmentsScreenshot 2024-02-28 at 14.13.11.png  
You need to use the CsoundObj objective C class otherwise you will need to implement audio yourself (with +-rtaudio=null) using CoreAudio. Audio IO is implemented in CsoundObj.m (together with csound processing), you can have a look at it to see what is needed.

Aldo see the Obj C examples for CsoundObj usage.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 29 Feb 2024, at 15:03, Tarmo Johannes <trmjhnns@gmail.com> wrote:


Hi!

I need another hint from people understanding Csound on iOS.

It is said in the documentation that in the code also Csound C-API can be used. Yes, it builds, also with the C++ API (including Csound.hpp) with no errors and seems to work but there is no audio output. How to deal with that?

Snippet of the testing code:

std::string orc = "sr=44100\n\
        ksmps=32\n\
        nchnls=2\n\
        0dbfs=1\n\
\n\
        instr 1\n\
        aout vco2 0.5, 440\n\
        outs aout, aout\n\
                endin";

    std::string sco = "i1 0 1";

    Csound* csound = new Csound();
    csound->SetOption("-odac");
    csound->CompileOrc(orc.c_str());
    csound->ReadScore(sco.c_str());
    csound->Start();
    csound->Perform();
    delete csound;


That gives warning

unknown rtaudio module: 'portaudio', using dummy module


It is understandable since  usually portaudio, auhal and other audio modules are used as plugins that probably are not built and included in libcsound.a 


I don't want to use Objective C since I am working on preparing a cross platform Csound App template, based on Qt C++/QML framework, that makes it relatively easy to build an app for all major platforms from the same code.


What do you suggest? Is there hope to achieve that?


Thanks!

tarmo




Kontakt Tarmo Johannes (<trmjhnns@gmail.com>) kirjutas kuupäeval K, 28. veebruar 2024 kell 14:17:
Thank you, Giovanni, Victor!

That was it! Including Accelerate Framework did the trick and I got the project building. 

<Screenshot 2024-02-28 at 14.13.11.png>



Without the hint I would really never ever have guessed it. I suggest some lines in the documentation (csound_ios_manual.pdf 2.3 Getting started with Your Own Project) about it would be absolutely in place.

Next step is to try it make it happen also in a Qt project.

Best!
Tarmo





Kontakt Victor Lazzarini (<Victor.Lazzarini@mu.ie>) kirjutas kuupäeval T, 27. veebruar 2024 kell 23:25:
The Accelerate framework is missing from your build. Because libcsound.a is static, you need to add all iOS dependencies when linking to it.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 27 Feb 2024, at 16:52, Tarmo Johannes <trmjhnns@gmail.com> wrote:



*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.

Hi!

I am back to try to learn how to use Csound API on  iOS.
The Examples project works, but when I am following the instructions on:
to create my own Xcode project

everything goes fine until when building the app. The error reported is:

Undefined symbols for architecture arm64:

  "_vDSP_create_fftsetup", referenced from:

      _csoundRealFFT2Setup in libcsound.a(fftlib.o)

  "_vDSP_destroy_fftsetup", referenced from:

      _setupDispose in libcsound.a(fftlib.o)

  "_vDSP_fft_zrip", referenced from:

      _csoundRealFFT2 in libcsound.a(fftlib.o)

      _vDSP_DCT_execute in libcsound.a(fftlib.o)

ld: symbol(s) not found for architecture arm64




For any case I copy the linker command below.


I had the same when I was trying to link a Qt C++ project against libcsound.a

When I checked libcsound.a to see which symbols are in there:

 nm -a /Users/tarmojohannes/Documents/src/csound-iOS-6.18.0/Csound\ iOS\ Obj-C\ Examples/csound-iOS/libs/libcsound.a | grep _vDSP 


it seems to be correct:

---------------- T _vDSP_DCT_execute

                 U _vDSP_create_fftsetup

                 U _vDSP_destroy_fftsetup

                 U _vDSP_fft_zrip



I did not find out how to check about the architecture.

This is the official csound-ios-6.18.0 package downloaded from Csound web site.

I tried also to build the iOS folder from sources myself but it failed, since weather the option

-T buildsystem=1 

bothered make or without it I got error:




CMake Error in CMakeLists.txt:

  The custom command generating


    /Users/tarmojohannes/Documents/src/csound-6.18.1/iOS/cs6iOS/csound_orclex.c


  is attached to multiple targets:


    CsoundLib

    CsoundLib-static


  but none of these is a common dependency of the other(s).  This is not

  allowed by the Xcode "new build system".


I had the same problem some months ago and then gave up. Can someone who knows more about the iOS development test the libcsound library?

The strange thing is that the demo project builds, so there might be some flags or settings I cannot guess that must be given..


Thanks!
tarmo

---

Linker command in Xcode () project:

Ld /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos/csound-ios-xcode-test.app/csound-ios-xcode-test normal (in target 'csound-ios-xcode-test' from project 'csound-ios-xcode-test')

    cd /Users/tarmojohannes/Documents/src/csound-ios-xcode-test

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios16.2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk -L/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/EagerLinkingTBDs -L/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos -L/Users/tarmojohannes/Documents/src/csound-ios-xcode-test/csound-iOS/libs -F/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/EagerLinkingTBDs -F/Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos -filelist /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/csound-ios-xcode-test.build/Debug-iphoneos/csound-ios-xcode-test.build/Objects-normal/arm64/csound-ios-xcode-test.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/csound-ios-xcode-test.build/Debug-iphoneos/csound-ios-xcode-test.build/Objects-normal/arm64/csound-ios-xcode-test_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -lcsound -lsndfile -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Intermediates.noindex/csound-ios-xcode-test.build/Debug-iphoneos/csound-ios-xcode-test.build/Objects-normal/arm64/csound-ios-xcode-test_dependency_info.dat -o /Users/tarmojohannes/Library/Developer/Xcode/DerivedData/csound-ios-xcode-test-fnvraxjcqxpnioblwmtthmbwgcqh/Build/Products/Debug-iphoneos/csound-ios-xcode-test.app/csound-ios-xcode-test



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here