[Stk] Fw: compilation error

Atunu Name atunu64 at yahoo.ca
Fri Sep 18 23:26:00 PDT 2009


Hello Gary,
thank you for your response.  
 I compiled the software according to the instructions. I can use play or record or others in the project/ examples/ folder. 

I tried o follow the link below: 
http://ccrma.stanford.edu/software/stk/compile.html  
The message are follows:
g++ -Wall -D__LITTLE_ENDIAN__ -I /Users/atunu/Desktop/audio_tool/stk-4.4.1/include/stk -o test test.cpp -L /Users/atunu/Desktop/audio_tool/stk-4.4.1/src/libstk.a

test.cpp:3:22: error: FileWvIn.h: No such file or directory
test.cpp:4:21: error: RtWvOut.h: No such file or directory
test.cpp:5: error: expected namespace-name before ‘;’ token
test.cpp:5: error: ‘<type error>’ is not a namespace
test.cpp: In function ‘int main()’:
test.cpp:10: error: ‘Stk’ has not been declared
test.cpp:10: error: ‘setSampleRate’ was not declared in this scope
test.cpp:13: error: ‘WvIn’ was not declared in this scope
test.cpp:13: error: ‘input’ was not declared in this scope
test.cpp:15: error: ‘WvOut’ was not declared in this scope
test.cpp:15: error: ‘output’ was not declared in this scope
test.cpp:19: error: expected type-specifier before ‘FileWvIn’
test.cpp:19: error: expected `;' before ‘FileWvIn’
test.cpp:23: error: expected type-specifier before ‘RtWvOut’
test.cpp:23: error: expected `;' before ‘RtWvOut’
test.cpp:25: error: expected type-specifier before ‘StkError’
test.cpp:25: error: expected `)' before ‘&’ token
test.cpp:25: error: expected `{' before ‘&’ token
test.cpp:25: error: expected primary-expression before ‘)’ token
test.cpp:25: error: expected `;' before ‘)’ token
test.cpp:47: error: expected type-specifier before ‘StkError’
test.cpp:47: error: expected `)' before ‘&’ token
test.cpp:47: error: expected `{' before ‘&’ token
test.cpp:47: error: expected primary-expression before ‘)’ token
test.cpp:47: error: expected `;' before ‘)’ token
test.cpp:52: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
test.cpp:53: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
test.cpp:56: error: expected `}' at end of input
test.cpp:56: error: expected `}' at end of input


I tried with
/usr/include/pthread or -lpthread 

But still I could not compile the code. Is there anything that I can do to compile the code different from the source software? I could not compile test.cpp in the project/example folder too.
Thank you.

----- Forwarded Message ----
From: Gary Scavone <gary at ccrma.stanford.edu>
To: Atunu Name <atunu64 at yahoo.ca>
Cc: stk at ccrma.stanford.edu
Sent: Thursday, September 17, 2009 5:45:30 PM
Subject: Re: [Stk] compilation error

Hi Atunu,

I think you need the pthread library for the MUTEX stuff.  In your second attempt, there appears to either be a badly formatted command line and/or the compiler can't find the STK library.  Did you run "make" in the src directory to compile the STK library?

--gary

On 16-Sep-09, at 12:05 PM, Atunu Name wrote:

> Hello,
> 
>  I am trying to compile an example, test.cpp  in a separate file. I have some errors:
>  g++ -o test  -I../../audio_tool/stk-4.4.1/include  test.cpp   -L ../../audio_tool/stk-4.4.1/src/ -lstk
> ../../audio_tool/stk-4.4.1/include/Mutex.h:67: error: ‘MUTEX’ does not name a type
> ../../audio_tool/stk-4.4.1/include/Mutex.h:68: error: ‘CONDITION’ does not name a type
> 
> I also tried the following:
> g++ -O3 -Wall -o test  -I ../../audio_tool/stk-4.4.1/include  -DHAVE_GETTIMEOFDAY -D__MACOSX_CORE__-D__LITTLE_ENDIAN__  test.cpp   -L ../../audio_tool/stk-4.4.1/src/ -lstk -lpthread -framework CoreAudio
> <command line>:1:16: warning: missing whitespace after the macro name
> ld: library not found for -lstk
> collect2: ld returned 1 exit status
> My stk-4.4.1 is on the desktop, and I am trying to use the test.cpp to make some changes according to my need  in another folder directory on my desktop.
> I played around this but still errors. Can anybody help me with an example, please.
> Thank you.
> 
> 
> 
> 
> Yahoo! Canada Toolbar : Search from anywhere on the web and bookmark your favourite sites. Download it now!
> 
> _______________________________________________
> Stk mailing list
> Stk at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/stk


      __________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr! 

http://www.flickr.com/gift/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ccrma-mail.stanford.edu/pipermail/stk/attachments/20090918/5190c796/attachment.html 


More information about the Stk mailing list