It works (remember -lcsound to the end when libcsound is static) g++ -I /home/khirai/csound/src/git/csound5/H/ \ -L /home/khirai/csound/src/git/csound5/ \ -lsndfile -lpthread -ldl test.cc -lcsound tito On Mon, Dec 12, 2011 at 12:01:13AM -0500, Kelly Hirai wrote: > i'm trying to build the example program in the Walsh tutorial in linux, > but i cant seem to get the linking to happen. did i miss a step building > csound from git or am i missing a flag here? > > g++ -I /home/khirai/csound/src/git/csound5/H/ -L > /home/khirai/csound/src/git/csound5/ -lcsound test.cc > > test.cc:(.text+0x15): undefined reference to `csoundCreate' > test.cc:(.text+0x31): undefined reference to `csoundInitialize' > test.cc:(.text+0x46): undefined reference to `csoundCompile' > test.cc:(.text+0x5c): undefined reference to `csoundPerformKsmps' > test.cc:(.text+0x71): undefined reference to `csoundDestroy' > collect2: ld returned 1 exit status > > test.cc: > #include > #include "csound.hpp" > int main(int argc, char* argv[]) > { > /*Create an instance of Csound*/ > CSOUND*csound=csoundCreate(0); > /*Initialise the library*/ > csoundInitialize(&argc, &argv, 0); > /*Compile Csound, i.e., run Csound with > the parameters passed via the command line. > Return false is successful*/ > int result=csoundCompile(csound,argc,argv); > /*check to see that Csound compiled Ok, then > start the performance loop. csoundPerformKsmps() > returns false if successful*/ > if(!result) > { > while(csoundPerformKsmps(csound)==0); > } > /*Finally destroy Csound*/ > csoundDestroy(csound); > return result; > } Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"