MSA Fluid

Hello,

I am completely new to openFrameworks and C++ so I am hoping this is not a dumb question :oops:

I am very keen to make a project using Memo’s MSA Fluid however when I try to compile the example I get the following error:

error: no matching function for call to `ofxSimpleGuiToo::addSlider(const char[18], float&, double, double, double)’|

from these 3 lines:

//gui.addSlider(“fs.viscocity”, fluidSolver.viscocity, 0.0, 0.01, 0.5);
//gui.addSlider(“fs.colorDiffusion”, fluidSolver.colorDiffusion, 0.0, 0.0003, 0.5);
//gui.addSlider(“fs.fadeSpeed”, fluidSolver.fadeSpeed, 0.0, 0.1, 0.5);

and this:

undefined reference to `MSA::ColorT::ColorT(MSA::ColorModel, float, float, float)’|

from this line:

fluidSolver.addColorAtIndex(index, drawColor * colorMult);

and I get the same from the similar line in the particle class.

If I comment these lines out then the example complies and runs the rest of the code.

I am using codeblocks on windows 7 and I am pretty sure I have the most recent version of the MSA Libs

Would anyone be able to tell me where I may be going wrong?

Thanks

Hi

  
  
//gui.addSlider("fs.viscocity", fluidSolver.viscocity, 0.0, 0.01, 0.5);  
//gui.addSlider("fs.colorDiffusion", fluidSolver.colorDiffusion, 0.0, 0.0003, 0.5);  
//gui.addSlider("fs.fadeSpeed", fluidSolver.fadeSpeed, 0.0, 0.1, 0.5);  
  
gui.addSlider("fs.viscocity", fluidSolver.viscocity, 0.0, 0.01).setSmoothing(0.5); // Can't remember if it's setSmoothing() or smoothing() :) do the same with the 3 commented lines  
  

As for the other problems I remember it was an addons Issue, I solve it adding also de Cinder stuff

Thanks! Working perfectly now :smiley:

hi.

I try to build MSAFluid (downloaded from github ) with Code::Blocks 10.5 in Ubuntu 10.10.
I get the following error:

  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreMath.h||In function ‘float MSA::fastInvSquareRoot(float)’:|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreMath.h|73|warning: dereferencing type-punned pointer will break strict-aliasing rules|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreMath.h|75|warning: dereferencing type-punned pointer will break strict-aliasing rules|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.h|39|error: variable or field ‘drawTexture’ declared void|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.h|39|error: ‘GLuint’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.h|39|error: ‘GLenum’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|36|error: ‘GLfloat’ does not name a type|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|43|error: ‘GLfloat’ does not name a type|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp||In function ‘void MSA::drawQuadAtCorner()’:|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|52|error: ‘GL_TEXTURE_COORD_ARRAY’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|52|error: ‘glEnableClientState’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|53|error: ‘GL_FLOAT’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|53|error: ‘tex_coords’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|53|error: ‘glTexCoordPointer’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|54|error: ‘GL_VERTEX_ARRAY’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|55|error: ‘verts’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|55|error: ‘glVertexPointer’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|56|error: ‘GL_TRIANGLE_FAN’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|56|error: ‘glDrawArrays’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|57|error: ‘glDisableClientState’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp||In function ‘void MSA::drawQuadAtCenter()’:|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|61|error: ‘GL_TEXTURE_COORD_ARRAY’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|61|error: ‘glEnableClientState’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|62|error: ‘GL_FLOAT’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|62|error: ‘tex_coords’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|62|error: ‘glTexCoordPointer’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|63|error: ‘GL_VERTEX_ARRAY’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|64|error: ‘verts’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|64|error: ‘glVertexPointer’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|65|error: ‘GL_TRIANGLE_FAN’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|65|error: ‘glDrawArrays’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|66|error: ‘glDisableClientState’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|70|error: variable or field ‘drawTexture’ declared void|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|70|error: ‘GLuint’ was not declared in this scope|  
/home/dorald/openframeworks-openFrameworks-454e0e1/addons/MSACore/src/MSACoreGL.cpp|70|error: ‘GLenum’ was not declared in this scope|  
||=== Build finished: 30 errors, 2 warnings ===|  
  

ps: addons imported -> Fluid , MSACore

any help pls…!