Hello everyone,
I am trying to compile the "simplest possible Csound API host" from the reference manual in C:
#include
int main (int argc, char **argv)
{
CSOUND *csound = csoundCreate(NULL);
int result = csoundCompile(csound, argc, argv);
if (!result)
result = csoundPerform(csound);
csoundDestroy(csound);
return (result >= 0 ? 0 : result);
}
After compiling and linking I get the following output:
basic.o: In function `main':
basic.c:(.text+0x1c): undefined reference to `csoundCreate'
basic.c:(.text+0x37): undefined reference to `csoundCompile'
basic.c:(.text+0x4b): undefined reference to `csoundPerform'
basic.c:(.text+0x59): undefined reference to `csoundDestroy'
collect2: ld returned 1 exit status
Any help greatly appreciated,
Josh
EDIT: Oh, I might have to install from source?



I was being silly
I didn't link correctly to the library with gcc + the "-l" prefix didn't want to work.