ofxStk icon indicating copy to clipboard operation
ofxStk copied to clipboard

error compiling pitchshift example on linux

Open rdtor opened this issue 5 years ago • 5 comments

../../../addons/ofxStk/libs/STK/src/Mutex.cpp:18:1: error: ‘Mutex’ does not name a type Mutex :: Mutex() ^~~~~ ../../../addons/ofxStk/libs/STK/src/Mutex.cpp:37:1: error: ‘Mutex’ does not name a type Mutex :: ~Mutex() ^~~~~ ../../../addons/ofxStk/libs/STK/src/Mutex.cpp:52:6: error: ‘Mutex’ has not been declared void Mutex :: lock() ^~~~~ ../../../addons/ofxStk/libs/STK/src/Mutex.cpp:65:6: error: ‘Mutex’ has not been declared void Mutex :: unlock() ^~~~~ ../../../addons/ofxStk/libs/STK/src/Mutex.cpp:78:6: error: ‘Mutex’ has not been declared void Mutex :: wait() ^~~~~ ../../../addons/ofxStk/libs/STK/src/Mutex.cpp:91:6: error: ‘Mutex’ has not been declared void Mutex :: signal() ^~~~~ make[1]: *** [../../../libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:354: ../../../addons/obj/linux64/Release/ofxStk/libs/STK/src/Mutex.o] Error 1 make[1]: Leaving directory '/home/shank/of-workspace/addons/ofxStk/example_pitchShift' make: *** [../../../libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:129: Release] Error 2

rdtor avatar May 24 '19 09:05 rdtor

Hey In the file Stk.h line 582 can you add a defined(__linux__)? so the whole line should look like

#elif defined(__LINUX_OSS__) || defined(__LINUX_ALSA__) || defined(__UNIX_JACK__) || defined(__linux__)
  #define __OS_LINUX__

and see if that works?

I think you are not going in to the #if in Mutex.h line 6. Let me know if that works

Ahbee avatar May 25 '19 07:05 Ahbee

I already have this line present 582 #elif defined(LINUX_OSS) || defined(LINUX_ALSA) || defined(UNIX_JACK) defined(linux) 583 #define OS_LINUX

rdtor avatar May 25 '19 08:05 rdtor

So is __OS_LINUX__ getting defined in your build ? can you define it regardless of any conditions? also move these lines outside the #if in Mutex.h and try it

  #include <pthread.h>
  typedef pthread_mutex_t MUTEX;
  typedef pthread_cond_t CONDITION;

Ahbee avatar May 26 '19 15:05 Ahbee

also do you have pthread installed?

Ahbee avatar May 26 '19 15:05 Ahbee

I installed pthread and i am getting different error,

n file included from ../../../libs/glm/include/glm/vec4.hpp:6, from ../../../libs/openFrameworks/math/ofVec4f.h:8, from ../../../libs/openFrameworks/math/ofVec3f.h:5, from ../../../libs/openFrameworks/types/ofPoint.h:3, from ../../../libs/openFrameworks/types/ofParameter.h:5, from ../../../libs/openFrameworks/utils/ofJson.h:4, from ../../../libs/openFrameworks/ofMain.h:21, from /home/s***/of-workspace/addons/ofxStk/example_pitchShift/src/main.cpp:1: ../../../libs/glm/include/glm/detail/type_vec4.hpp:19:9: note: ‘glm::i16vec4’ {aka ‘struct glm::tvec4<short int, (glm::precision)0>’} declared here struct tvec4 ^~~~~ In file included from /home/s***/of-workspace/addons/ofxStk/example_pitchShift/src/ofApp.h:5, from /home/s***/of-workspace/addons/ofxStk/example_pitchShift/src/main.cpp:2: /home/s***/of-workspace/addons/ofxStk/example_pitchShift/src/BasicSampler.h: In member function ‘virtual stk::StkFloat BasicSampler::tick(unsigned int)’: /home/s***/of-workspace/addons/ofxStk/example_pitchShift/src/BasicSampler.h:47:15: warning: unused variable ‘input’ [-Wunused-variable] float input = lastFrame_[0]; ^~~~~ /home/s***/of-workspace/addons/ofxStk/example_pitchShift/src/BasicSampler.h:49:15: warning: unused variable ‘output’ [-Wunused-variable] float output = lastFrame_[0]; ^~~~~~ make[1]: *** [../../../libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:217: obj/linux64/Release/src/main.o] Error 1 make[1]: Leaving directory '/home/s***/of-workspace/addons/ofxStk/example_pitchShift' make: *** [../../../libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:129: Release] Error 2

rdtor avatar May 27 '19 06:05 rdtor