LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   esound client programming (https://www.linuxquestions.org/questions/programming-9/esound-client-programming-57017/)

eantoranz 04-27-2003 12:00 PM

esound client programming
 
I'm trying to program an application that will play st by esd. I use Mandrake 9.1. I installed the rpm package libesound0-devel-0.2.29-2mdk which has /usr/include/esd.h in it. I made a veeeery simple program in C++ (just to test) but when I compile it, the compiler complains:

[antoranz@carcachita esd]$ g++ base.cpp
/home/antoranz/tmp/ccHOzvUJ.o(.text+0x29): In function `main':
: undefined reference to `esd_print_server_info'
collect2: ld returned 1 exit status

This is the source code:
[antoranz@carcachita esd]$ cat base.cpp
#include <stdio.h>
#include <esd.h>

esd_server_info_t serverInfo;

int main () {
printf("Getting server info\n");
esd_print_server_info(&serverInfo);
printf("Esd Version:%d\n", serverInfo.version);//#esd_server_info_t.version);
}

Can anybody tell me how to work around it?

I have been for two days trying to get documents about writing esound clients, but found extremely little information. Can U tell me where to look 2?

Thanks!

Tinkster 04-27-2003 08:31 PM

Never used esd, but my educated guess is that you
need to provide a path to the shared library to
your compiler :)
Code:

g++ base.cpp -L</path/to/lib> -l<esd-lib-name>
Cheers,
Tink

mhearn 04-28-2003 09:37 AM

Eurgh, esound is junk. It's been obsolete for years, unfortunately it does the job just well enough that nobody has built something better (that's portable, jack is a lot better if you only care about linux).

If you just want to go "boing" you should be using the KDE or GNOME APIs really, they abstract you from all this stuff. eSound is more a generic mixing service.

eantoranz 05-02-2003 12:48 AM

Thanks, guys. I was able to compile it using esdcfg... u ask it for the options that have to be given to g++. However, I wasn't able to use the api properli. Any places where i can look to learn to use it?


All times are GMT -5. The time now is 08:09 AM.