Need help with properly compiling and linking libraries for ofxmaxim in openFrameworks under Visual Studio 2017
loricolbert opened this issue · comments
I'm brand new to openFrameworks and Visual Studio 2017 and I'm trying to replicate a project that uses the Maximilian add on. I'm getting a bunch of C4244, C3861, C4996, C4301, C4305, C4018, and C2491 errors that seem to be caused by something that I'm doing wrong with the libraries for ofxmaxim, because they are all involving files ftt.cpp, maximilian.h, maximfcc.cpp, maxiatoms.cpp, and stb_vorbis.c.
I saw a response to someone that seemed to be having a similar problem and it looked like the problem had to do with properly compiling and linking the library files. I literally don't know anything about C++, so I know this is probably a completely dumb question, but would you be able to walk me through how to get Maximilian working in my project? I downloaded the Maximilian add on both by unzipping the file into the add ons folder and also by cloning it from GitHub, and I started my new project within VS using the ofxmaxim addon. Before I add any of the code from the project I'm trying to replicate, I already get all of the errors I described above.
Any help that you can give me would be greatly appreciated!
I have just pulled the master branch and am seeing that maxiFFT::bins
is referenced in maxiConvolve.cpp
but is inaccessible due to being declared as "private" in maxiFFT.h
. For my purposes, I can likely use the MaximillionV1
branch instead. Perhaps this will work for you?
In any case, it would appear that maxiConvolve.cpp
should be changed to maxiFFT.getNumBins()
instead of maxiFFT::bins
. That fixed the first compilation issues for me. It seems that the master branch is just fundamentally broken right now.
Out of interest, what version of Windows are you using?
Make sure that you are including the correct header path. What you're describing sounds like you're using the root Maximilian
folder. If so, try using Maximilian/src
(or Maximillion-master
if you downloaded the ZIP)
Additionally, I was getting issues with maximilian.embind.cpp
and had to exclude it from the project. Everything now works for me.
If you're following the JUCE tutorial by The Audio Programmer on YouTube, for now you'll need to ensure you make the above changes, if you're wanting to use the current latest version on the master
branch.
Also ..\Maximilian\libs\maxiSynths.cpp
needs to change line 299
from
outputs[i]=samples[i].play(pitchRatios[(int)pitch[i]+originalPitch]*((1./samples[i].getLength())*maxiSettings::sampleRate),0,samples[i].getLength())*envOut[i];
to
outputs[i]=samples[i].play()*envOut[i];
as it it has too many Arguments.