'math' does not name a type || 'math' has not been declared

I set out to fiddle with an idea involving mashing up a few existing modules from two developers (namely Squinky Labs and Bogaudio). So, I started with the following steps:

  1. Clone BogaudioModules and SquinkyVCV repositories
  2. Create new plugin using helper.py
  3. Copy modules from the cloned repositories to the new plugin’s source directory
  4. Follow the chains of included header files (for these two source plugins, there are many) from the copied modules, and likewise copy them into matching directories in the new plugin
  5. Copy all relevant lines from source plugins’ main header file and source file (bogaudio.hpp/cpp and Squinky.hpp/cpp into a new plugin.hpp/cpp
  6. Copy relevant lines from source plugins’ makefiles into a new makefile
  7. Check to see if the new plugin compiles

The result is a long stream of errors from the compiler mostly related to the fact that it seems to be failing to include math.h for both plugin files and included Rack files.

Other plugins compile fine for me, including both BogaudioModules and SquinkyVCV.

Compiler output

Full source

Could it be that somewhere it is including math.h 2 times and the compiler doesn’t know what to do as it is ambiguous?

1 Like

I see that Squinky Labs SqMath.h includes “math.hpp” while Bogaudio’s dsp defines its own math.hpp. Renaming the Bogaudio file and references to bgmath.hpp got rid of all the math include errors.

Just a few errors left to figure out, probably due to something similar…

1 Like

#include "SqHelper"

that will help, but those errors farther on about Module and such seem scary. I don’t off-hand know what they are, although it sure was hard to get all that stuff to build and find all the right namespaces. Root of the problem is that for a long time you could build everything for either v0.6 or v1.0 VCV rack. If I had not done that these issues would be a little simpler…