Skip to content

Using trajopt_sqp on Windows fails #433

@Astraaaaaaa

Description

@Astraaaaaaa

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions