Hi Ben,

It appears that you are trying to cross-compile your program using the
interface of Webots. The error you get is displayed by the linker because
some functions of the sound driver are missing into libepuck.a. libepuck.a
is the static library used by Webots in order to be able to cross-compile a
code using the Webots API to the e-puck (a kind of fa├žade from Webots API to
the e-puck functions). As libepuck.a has been designed to support only a
subset of the functionnalities of both the e-puck and Webots (not including
the sound), this library has not been built with the sound drivers (see the
table at the bottom of
http://www.e-puck.org/index.php?option=com_content&task=view&id=22&Itemid=85).
This explain the errors you get.

In my point of view, I think mixing the Webots API with some e-puck
functions is not a good idea. You should not use the Webots API but rather
create your own C program starting from scatch. You can start from the
transfer/e-puck/firmware directory which is used to generate the firmware
used by Webots to communicate with the e-puck during a remote-control
session. Take a look at firmware.c and its Makefile which are linked with
almost all the drivers of the e-puck library including sound (see
firmware.c:573-601)..

I hope this helps,
Regards,
Fabien

2009/10/7 Ben Farrall <b...@cs.stir.ac.uk>

> Hi,
>
> I'm a first time C programmer doing a project using e-puck robots. I'm
> trying to implement the play sound function to simply make the robot beep.
> However, while trying to import the library files it throws an error and
> mentions undefined referencing. Here is the following console output when
> i try to cross compile:
>
> mingw32-make -f Makefile.e-puck
> e-puck_crosscompilation-pic30.o compiled
> C:\Program
> Files\Webots\transfer\e-puck/libepuck\libepuck.a(e_sound.o)(.text+0x12):
> In function `.L3':
> : undefined reference to `_e_init_dci_master'
> C:\Program
> Files\Webots\transfer\e-puck/libepuck\libepuck.a(e_sound.o)(.text+0x14):
> In function `.L3':
> : undefined reference to `_e_init_codec_slave'
> C:\Program
> Files\Webots\transfer\e-puck/libepuck\libepuck.a(e_sound.o)(.text+0x20):
> In function `_e_play_sound':
> : undefined reference to `_e_dci_unavailable'
> C:\Program
> Files\Webots\transfer\e-puck/libepuck\libepuck.a(e_sound.o)(.text+0x22):
> In function `_e_play_sound':
> : undefined reference to `_e_stop_flag'
> C:\Program
> Files\Webots\transfer\e-puck/libepuck\libepuck.a(e_sound.o)(.text+0x28):
> In function `_e_play_sound':
> : undefined reference to `_e_sub_dci_kickoff'
> mingw32-make: *** [e-puck_crosscompilation.cof] Error 1
> done.
>
>
> I've tried different approaches to fix it but nothing has helped.
>
> I would appreciate any help if possible.
>
> Regards
>
> -Ben
>
> --
> The Sunday Times Scottish University of the Year 2009/2010
> The University of Stirling is a charity registered in Scotland,
>  number SC 011159.
>
>
> _______________________________________________
> E-puck-user mailing list
> E-puck-user@gna.org
> https://mail.gna.org/listinfo/e-puck-user
>
_______________________________________________
E-puck-user mailing list
E-puck-user@gna.org
https://mail.gna.org/listinfo/e-puck-user

Reply via email to