onox / canberra-ada Goto Github PK
View Code? Open in Web Editor NEWAda 2012 bindings for libcanberra
License: Apache License 2.0
Ada 2012 bindings for libcanberra
License: Apache License 2.0
It would be nice to be able to play sound files. This is how it would be done in C:
ca_context_play(ca_gtk_context_get(), 0, CA_PROP_MEDIA_FILENAME, path, NULL);
I had to add libcanberra-dev to the list of packages to install, otherwise the build fails with the following error:
gprbuild -dm -p -P tools/canberra.gpr -cargs -O2 -march=native
Maximum number of simultaneous compilations = 4
Build Libraries
[gprlib] canberra-ada.lexch
[link library] libcanberra-ada.so
/usr/bin/ld: cannot find -lcanberra
collect2: error: ld returned 1 exit status
gprlib: /usr/bin/gnatgcc execution error
gprbuild: could not build library for project canberra
Makefile:25: recipe for target 'build' failed
make: *** [build] Error 4
I had to add libcanberra-dev to the list of packages to install, otherwise the build fails with the following error:
gprbuild -dm -p -P tools/canberra.gpr -cargs -O2 -march=native
Maximum number of simultaneous compilations = 4
Build Libraries
[gprlib] canberra-ada.lexch
[link library] libcanberra-ada.so
/usr/bin/ld: cannot find -lcanberra
collect2: error: ld returned 1 exit status
gprlib: /usr/bin/gnatgcc execution error
gprbuild: could not build library for project canberra
Makefile:25: recipe for target 'build' failed
make: *** [build] Error 4
I tried to port jfuica/bingada to use Alire. The default sound option is canberra_ada, which I saw it's already in the index.
So I made the following to create a new project file for Alire from scratch:
mv bingada.gpr bingada_custom.gpr
alr init --in-place --bin bingada
# new bingada.gpr edited to adapt compiler switches for bingada
alr with canberra_ada
alr with gtkada
alr build
I expected it to build without any further configuration, but I got a linking problem.
Link
[link] bingada.adb
/usr/bin/ld: /home/mgr/src/github/jfuica/bingada/alire/cache/dependencies/canberra_ada_2.0.0_3de867fe/build/lib/libcanberra-ada.a(canberra.o): in function `canberra__set_property':
canberra.adb:(.text.canberra__set_property+0x6f): undefined reference to `ca_context_change_props'
/usr/bin/ld: /home/mgr/src/github/jfuica/bingada/alire/cache/dependencies/canberra_ada_2.0.0_3de867fe/build/lib/libcanberra-ada.a(canberra.o): in function `canberra__set_property__2':
canberra.adb:(.text.canberra__set_property__2+0x5f): undefined reference to `ca_proplist_sets'
/usr/bin/ld: /home/mgr/src/github/jfuica/bingada/alire/cache/dependencies/canberra_ada_2.0.0_3de867fe/build/lib/libcanberra-ada.a(canberra.o): in function `canberra__finalize__2':
canberra.adb:(.text.canberra__finalize__2+0xe): undefined reference to `ca_context_destroy'
/usr/bin/ld: /home/mgr/src/github/jfuica/bingada/alire/cache/dependencies/canberra_ada_2.0.0_3de867fe/build/lib/libcanberra-ada.a(canberra.o): in function `canberra__create':
canberra.adb:(.text.canberra__create+0x133): undefined reference to `ca_context_create'
/usr/bin/ld: /home/mgr/src/github/jfuica/bingada/alire/cache/dependencies/canberra_ada_2.0.0_3de867fe/build/lib/libcanberra-ada.a(canberra.o): in function `canberra__play_internal':
canberra.adb:(.text.canberra__play_internal+0x3e): undefined reference to `ca_proplist_create'
/usr/bin/ld: canberra.adb:(.text.canberra__play_internal+0x17d): undefined reference to `ca_context_play_full'
/usr/bin/ld: canberra.adb:(.text.canberra__play_internal+0x1f3): undefined reference to `ca_proplist_destroy'
/usr/bin/ld: canberra.adb:(.text.canberra__play_internal+0x21d): undefined reference to `ca_proplist_destroy'
/usr/bin/ld: /home/mgr/src/github/jfuica/bingada/alire/cache/dependencies/canberra_ada_2.0.0_3de867fe/build/lib/libcanberra-ada.a(canberra.o): in function `canberra__cancelCL':
canberra.adb:(.text.canberra__cancelCL+0xc): undefined reference to `ca_context_cancel'
collect2: error: ld returned 1 exit status
gprbuild: link of bingada.adb failed
gprbuild: failed command was: /usr/bin/gnatgcc bingada.o b__bingada.o /home/mgr/src/github/jfuica/bingada/obj/q_bingo.o /home/mgr/src/github/jfuica/bingada/obj/q_bingo-q_gtk.o /home/mgr/src/github/jfuica/bingada/obj/q_bingo-q_gtk-q_intl.o /home/mgr/src/github/jfuica/bingada/obj/q_bingo_help.o /home/mgr/src/github/jfuica/bingada/obj/q_csv.o /home/mgr/src/github/jfuica/bingada/obj/q_csv-q_read_file.o /home/mgr/src/github/jfuica/bingada/obj/q_gen_shuffle.o /home/mgr/src/github/jfuica/bingada/obj/q_sound.o /home/mgr/src/github/jfuica/bingada/obj/q_bingo-q_bombo.o /home/mgr/src/github/jfuica/bingada/obj/q_bingada.o /home/mgr/src/github/jfuica/bingada/alire/cache/dependencies/gtkada_21.0.0_3c1373c0/install_dir/lib/gtkada/gtkada.static/gtkada/libgtkada.a /home/mgr/src/github/jfuica/bingada/alire/cache/dependencies/canberra_ada_2.0.0_3de867fe/build/lib/libcanberra-ada.a -Linstall_dir/lib -Linstall_dir/bin -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0 -lfontconfig -lfreetype -L/home/mgr/src/github/jfuica/bingada/obj/ -L/home/mgr/src/github/jfuica/bingada/obj/ -L/home/mgr/src/github/jfuica/bingada/alire/cache/dependencies/canberra_ada_2.0.0_3de867fe/build/lib/ -L/home/mgr/src/github/jfuica/bingada/alire/cache/dependencies/gtkada_21.0.0_3c1373c0/install_dir/lib/gtkada/gtkada.static/gtkada/ -L/usr/lib/gcc/x86_64-linux-gnu/9/adalib/ -shared-libgcc -lgnarl-9 -lgnat-9 -lpthread -lrt -ldl -Wl,-rpath-link,/usr/lib/gcc/x86_64-linux-gnu/9//adalib -Wl,-z,origin,-rpath,$ORIGIN/..//obj/install_dir/lib:$ORIGIN/..//obj/install_dir/bin:$ORIGIN/..//obj:$ORIGIN/..//alire/cache/dependencies/canberra_ada_2.0.0_3de867fe/build/lib:$ORIGIN/..//alire/cache/dependencies/gtkada_21.0.0_3c1373c0/install_dir/lib/gtkada/gtkada.static/gtkada:/usr/lib/gcc/x86_64-linux-gnu/9/adalib:/usr/lib64:/usr/lib -o /home/mgr/src/github/jfuica/bingada/bin//bingada
error: Command ["gprbuild", "-gnatwU", "-j0", "-p", "-P", "bingada.gpr"] exited with code 4
error: Compilation failed.
Is some -lcanberra
missing somewhere? For gtkada, a switch like -lgtk-3
is added to the link command, but nothing about -lcanberra
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.