[Stk] Fw: Fw: compilation error
Atunu Name
atunu64 at yahoo.ca
Sat Sep 19 07:12:55 PDT 2009
Hello: Now I tried the following, also the path of the header in the corresponding file. Do I need RtAudio library or RtAudio.cpp in the command line seperately? I tried using this too.
g++ -Wall -DHAVE_GETTIMEOFDAY -D__MACOSX_CORE__ -D__LITTLE_ENDIAN__ -I/Users/atunu/Desktop/audio_tool/stk-4.4.1/include/ -o test test.cpp -L/Users/atunu/Desktop/audio_tool/stk-4.4.1/src/ -lstk
Undefined symbols:
"_AudioDeviceCreateIOProcID", referenced from:
RtApiCore::probeDeviceOpen(unsigned int, RtApi::StreamMode, unsigned int, unsigned int, unsigned int, unsigned long, unsigned int*, RtAudio::StreamOptions*)in cczG8Ae6.o
"_AudioDeviceDestroyIOProcID", referenced from:
RtApiCore::closeStream() in cczG8Ae6.o
RtApiCore::closeStream() in cczG8Ae6.o
"_AudioHardwareGetProperty", referenced from:
RtApiCore::getDefaultOutputDevice() in cczG8Ae6.o
RtApiCore::getDefaultOutputDevice() in cczG8Ae6.o
RtApiCore::getDefaultInputDevice() in cczG8Ae6.o
RtApiCore::getDefaultInputDevice() in cczG8Ae6.o
RtApiCore::getDeviceInfo(unsigned int)in cczG8Ae6.o
RtApiCore::probeDeviceOpen(unsigned int, RtApi::StreamMode, unsigned int, unsigned int, unsigned int, unsigned long, unsigned int*, RtAudio::StreamOptions*)in cczG8Ae6.o
"_AudioStreamSetProperty", referenced from:
RtApiCore::probeDeviceOpen(unsigned int, RtApi::StreamMode, unsigned int, unsigned int, unsigned int, unsigned long, unsigned int*, RtAudio::StreamOptions*)in cczG8Ae6.o
RtApiCore::probeDeviceOpen(unsigned int, RtApi::StreamMode, unsigned int, unsigned int, unsigned int, unsigned long, unsigned int*, RtAudio::StreamOptions*)in cczG8Ae6.o
RtApiCore::probeDeviceOpen(unsigned int, RtApi::StreamMode, unsigned int, unsigned int, unsigned int, unsigned long, unsigned int*, RtAudio::StreamOptions*)in cczG8Ae6.o
RtApiCore::probeDeviceOpen(unsigned int, RtApi::StreamMode, unsigned int, unsigned int, unsigned int, unsigned long, unsigned int*, RtAudio::StreamOptions*)in cczG8Ae6.o
RtApiCore::probeDeviceOpen(unsigned int, RtApi::StreamMode, unsigned int, unsigned int, unsigned int, unsigned long, unsigned int*, RtAudio::StreamOptions*)in cczG8Ae6.o
RtApiCore::probeDeviceOpen(unsigned int, RtApi::StreamMode, unsigned int, unsigned int, unsigned int, unsigned long, unsigned int*, RtAudio::StreamOptions*)in cczG8Ae6.o
"_AudioDeviceAddPropertyListener", referenced from:
RtApiCore::probeDeviceOpen(unsigned int, RtApi::StreamMode, unsigned int, unsigned int, unsigned int, unsigned long, unsigned int*, RtAudio::StreamOptions*)in cczG8Ae6.o
"_AudioDeviceGetProperty", referenced from:
RtApiCore::getDeviceInfo(unsigned int)in cczG8Ae6.o
RtApiCore::getDeviceInfo(unsigned int)in cczG8Ae6.o
RtApiCore::getDeviceInfo(unsigned int)in cczG8Ae6.o
RtApiCore::getDeviceInfo(unsigned int)in cczG8Ae6.o
RtApiCore::getDeviceInfo(unsigned int)in cczG8Ae6.o
RtApiCore::probeDeviceOpen(unsigned int, RtApi::StreamMode, unsigned int, unsigned int, unsigned int, unsigned long, unsigned int*, RtAudio::StreamOptions*)in cczG8Ae6.o
RtApiCore::probeDeviceOpen(unsigned int, RtApi::StreamMode, unsigned int, unsigned int, unsigned int, unsigned long, unsigned int*, RtAudio::StreamOptions*)in cczG8Ae6.o
RtApiCore::probeDeviceOpen(unsigned int, RtApi::StreamMode, unsigned int, unsigned int, unsigned int, unsigned long, unsigned int*, RtAudio::StreamOptions*)in cczG8Ae6.o
RtApiCore::probeDeviceOpen(unsigned int, RtApi::StreamMode, unsigned int, unsigned int, unsigned int, unsigned long, unsigned int*, RtAudio::StreamOptions*)in cczG8Ae6.o
"_AudioHardwareGetPropertyInfo", referenced from:
RtApiCore::getDeviceCount() in cczG8Ae6.o
"_AudioDeviceStop", referenced from:
RtApiCore::stopStream() in cczG8Ae6.o
RtApiCore::stopStream() in cczG8Ae6.o
RtApiCore::closeStream() in cczG8Ae6.o
RtApiCore::closeStream() in cczG8Ae6.o
"_AudioHardwareSetProperty", referenced from:
RtApiCore::probeDeviceOpen(unsigned int, RtApi::StreamMode, unsigned int, unsigned int, unsigned int, unsigned long, unsigned int*, RtAudio::StreamOptions*)in cczG8Ae6.o
"_AudioDeviceGetPropertyInfo", referenced from:
hasProperty(unsigned long, unsigned long, bool, unsigned long)in cczG8Ae6.o
RtApiCore::getDeviceInfo(unsigned int)in cczG8Ae6.o
RtApiCore::getDeviceInfo(unsigned int)in cczG8Ae6.o
RtApiCore::getDeviceInfo(unsigned int)in cczG8Ae6.o
RtApiCore::probeDeviceOpen(unsigned int, RtApi::StreamMode, unsigned int, unsigned int, unsigned int, unsigned long, unsigned int*, RtAudio::StreamOptions*)in cczG8Ae6.o
"_AudioDeviceSetProperty", referenced from:
RtApiCore::probeDeviceOpen(unsigned int, RtApi::StreamMode, unsigned int, unsigned int, unsigned int, unsigned long, unsigned int*, RtAudio::StreamOptions*)in cczG8Ae6.o
"_AudioStreamGetProperty", referenced from:
RtApiCore::probeDeviceOpen(unsigned int, RtApi::StreamMode, unsigned int, unsigned int, unsigned int, unsigned long, unsigned int*, RtAudio::StreamOptions*)in cczG8Ae6.o
RtApiCore::probeDeviceOpen(unsigned int, RtApi::StreamMode, unsigned int, unsigned int, unsigned int, unsigned long, unsigned int*, RtAudio::StreamOptions*)in cczG8Ae6.o
RtApiCore::probeDeviceOpen(unsigned int, RtApi::StreamMode, unsigned int, unsigned int, unsigned int, unsigned long, unsigned int*, RtAudio::StreamOptions*)in cczG8Ae6.o
"_AudioDeviceStart", referenced from:
RtApiCore::startStream() in cczG8Ae6.o
RtApiCore::startStream() in cczG8Ae6.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
I also tried the following and with some different options:
g++ -Wall -DHAVE_GETTIMEOFDAY -D__MACOSX_CORE__ -D__LITTLE_ENDIAN__
-I/Users/atunu/Desktop/audio_tool/stk-4.4.1/include/ -o test test.cpp
/Users/atunu/Desktop/audio_tool/stk-4.4.1/src/RtAudio.cpp
-L/Users/atunu/Desktop/audio_tool/stk-4.4.1/src/ -lstk -L/Users/atunu/Desktop/audio_tool/rtaudio-4.0.6/librtaudio.a
thanks.
----- Forwarded Message ----
From: Gary Scavone <gary at ccrma.stanford.edu>
To: Atunu Name <atunu64 at yahoo.ca>
Sent: Saturday, September 19, 2009 1:15:21 PM
Subject: Re: [Stk] Fw: compilation error
Hi Atuna,
I would expect your statement should be something like:
g++ -Wall -D__LITTLE_ENDIAN__ -I /Users/atunu/Desktop/audio_tool/stk-4.4.1/include/ -o test test.cpp -L/Users/atunu/Desktop/audio_tool/stk-4.4.1/src/ -lstk
--gary
On 19-Sep-09, at 2:26 AM, Atunu Name wrote:
> 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
>
>
> Make your browsing faster, safer, and easier with the new Internet Explorer® 8. Optimized for Yahoo! Get it Now for Free!_______________________________________________
> Stk mailing list
> Stk at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/stk
__________________________________________________________________
Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ccrma-mail.stanford.edu/pipermail/stk/attachments/20090919/fe13c193/attachment-0001.html
More information about the Stk
mailing list