tesseract icon indicating copy to clipboard operation
tesseract copied to clipboard

Using trajopt_sqp on Windows fails

Open Astraaaaaaa opened this issue 1 year ago • 2 comments

At file: trajopt_sqp\types.h

enum class CostPenaltyType
{
  SQUARED,
  ABSOLUTE, // conflict with macro defined in #include <wingdi.h>
  HINGE
};

// ...

double best_exact_merit{ std::numeric_limits<double>::max() };  // conflict with macro defined in minwindef.h

when I use the trajopt_sqp package would encounter with: error C2143: syntax error : missing '}' before 'constant'

how do you feel about adding those lines before CostPenaltyType?

#if (_WIN32 || _WIN64)
#undef ABSOLUTE
#undef max(a,b)
#endif

Astraaaaaaa avatar Jan 11 '24 09:01 Astraaaaaaa