[Stk] compile errors
Stephen Sinclair
sinclair at music.mcgill.ca
Tue Aug 12 13:52:02 PDT 2008
This is on Fedora 9, 64-bit.
I'm getting compile errors on a freshly downloaded copy of STK 4.3.1.
The configure stage is successful.
A patch is at the bottom of this email, though maybe there are more
appropriate fixes.
$ gcc --version
gcc (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)
g++ -O3 -Wall -g -D__GXX__ -I../include -Iinclude -D__LITTLE_ENDIAN__
-D__LINUX_ALSA__ -D__LINUX_ALSASEQ__ -DRAWWAVE_PATH=\"../rawwaves/\"
-c Stk.cpp -o Release/Stk.o
Stk.cpp: In constructor 'StkFrames::StkFrames(unsigned int, unsigned
int, bool)':
Stk.cpp:234: error: 'calloc' was not declared in this scope
Stk.cpp: In constructor 'StkFrames::StkFrames(const StkFloat&,
unsigned int, unsigned int, bool)':
Stk.cpp:253: error: 'malloc' was not declared in this scope
Stk.cpp: In destructor 'StkFrames::~StkFrames()':
Stk.cpp:269: error: 'free' was not declared in this scope
Stk.cpp: In member function 'void StkFrames::resize(size_t, unsigned int)':
Stk.cpp:285: error: 'free' was not declared in this scope
Stk.cpp:286: error: 'malloc' was not declared in this scope
make: *** [Stk.o] Error 1
Fixed this by adding <stdlib.h> and <string.h> to Stk.h.
Then:
g++ -O3 -Wall -g -D__GXX__ -I../include -Iinclude -D__LITTLE_ENDIAN__
-D__LINUX_ALSA__ -D__LINUX_ALSASEQ__ -DRAWWAVE_PATH=\"../rawwaves/\"
-c Messager.cpp -o Release/Messager.o
Messager.cpp: In function 'void* socketHandler(void*)':
Messager.cpp:334: error: 'sort' is not a member of 'std'
make: *** [Messager.o] Error 1
Fixed by adding <algorithm> to Messager.cpp.
Then:
g++ -O3 -Wall -g -D__GXX__ -I../include -Iinclude -D__LITTLE_ENDIAN__
-D__LINUX_ALSA__ -D__LINUX_ALSASEQ__ -DRAWWAVE_PATH=\"../rawwaves/\"
-c RtAudio.cpp -o Release/RtAudio.o
RtAudio.cpp: In member function 'virtual bool
RtApiAlsa::probeDeviceOpen(unsigned int, RtApi::StreamMode, unsigned
int, unsigned int, unsigned int, RtAudioFormat, unsigned int*,
RtAudio::StreamOptions*)':
RtAudio.cpp:5438: error: 'INT_MAX' was not declared in this scope
make: *** [RtAudio.o] Error 1
Fixed by adding <limits.h> to RtAudio.cpp.
Steve
----------------------------------------------------------------
diff -u -r --exclude config.status a/stk-4.3.1/include/Stk.h
b/stk-4.3.1/include/Stk.h
--- a/stk-4.3.1/include/Stk.h 2007-12-05 19:58:33.000000000 -0500
+++ b/stk-4.3.1/include/Stk.h 2008-08-12 16:38:52.000000000 -0400
@@ -57,6 +57,8 @@
#include <iostream>
#include <sstream>
#include <vector>
+#include <stdlib.h>
+#include <string.h>
// Most data in STK is passed and calculated with the
// following user-definable floating-point type. You
diff -u -r --exclude config.status a/stk-4.3.1/src/Messager.cpp
b/stk-4.3.1/src/Messager.cpp
--- a/stk-4.3.1/src/Messager.cpp 2007-12-05 19:58:27.000000000 -0500
+++ b/stk-4.3.1/src/Messager.cpp 2008-08-12 16:42:23.000000000 -0400
@@ -34,6 +34,7 @@
#include "Messager.h"
#include <iostream>
+#include <algorithm>
#include "SKINI.msg"
static const int STK_FILE = 0x1;
diff -u -r --exclude config.status a/stk-4.3.1/src/RtAudio.cpp
b/stk-4.3.1/src/RtAudio.cpp
--- a/stk-4.3.1/src/RtAudio.cpp 2007-12-07 03:04:43.000000000 -0500
+++ b/stk-4.3.1/src/RtAudio.cpp 2008-08-12 16:44:50.000000000 -0400
@@ -42,6 +42,7 @@
#include "RtAudio.h"
#include <iostream>
+#include <limits.h>
// Static variable definitions.
const unsigned int RtApi::MAX_SAMPLE_RATES = 14;
More information about the Stk
mailing list