DSPFilters icon indicating copy to clipboard operation
DSPFilters copied to clipboard

DspFilters won't compile with VS 2013

Open dgolub opened this issue 11 years ago • 6 comments

DspFilters doesn't compile with Visual Studio 2013. This happens because the relies on #include pulling in std::min and std::max. This is not in the C++ standard and is no longer the case in VS 2013. The problem can be fixed by adding #include to Common.h.

dgolub avatar Nov 01 '13 17:11 dgolub

Hi,

I am trying to compile the project with VS2013, but as you stated i cant do it. I dont understand that "the problem" can be fixed by adding #include to common.h"....which #include??

I have tried with projects located at "shared", and "user" folders.

Thanks in advance!

errors

carlmarc avatar Apr 20 '15 10:04 carlmarc

Although it's been over a year since the last comment, just want to add for anyone else with the same issue: the missing preprocessor line is #include <algorithm>.

ethanbb avatar Sep 06 '16 15:09 ethanbb

@ethanbb are you talking about this https://github.com/vinniefalco/DSPFilters/pull/26 PR? I could merge it.

galchinsky avatar Sep 06 '16 15:09 galchinsky

OK, I didn't see that pull request. I think in addition to that std::max call in RootFinder.cpp, there's a std::min call in SmoothedFilter.h (and it's likely these functions might be wanted somewhere else in the future), so it might be better just to put the include statement in Common.h instead.

However, I also just found the DSPFiltersDemo repository - is that meant to be a replacement for this one?

ethanbb avatar Sep 06 '16 15:09 ethanbb

This repo is supposed to be the main and I asked to maintain it. My last commit adds the include statement to Common.h.

galchinsky avatar Sep 06 '16 16:09 galchinsky

Oh I see, thanks for the info and for fixing that!

ethanbb avatar Sep 06 '16 16:09 ethanbb