Skip to content

getcwd macro redifinition warning #115

@afabri

Description

@afabri

Hello,

The following program produces the warning C4005 getcwd macro redifinitionwhen compiled with Visual C++ (2017-2022) in debug mode.

#  define _CRTDBG_MAP_ALLOC 1
#include <crtdbg.h>
#include <scip/def.h>

int main()
{
    char* ptr = 0;
    int i = 0;
    getcwd(ptr, 0);

    return 0;
}

CRTDBG_MAP_ALLOC is documented and not something internal.

The #define in <scip/def.h> is the problem here. Semantically the two defines do the same thing.

We originally encounter this warning in this CGAL testsuite

We deal with this and other problems with the maco being defined in this pullrequest.

Metadata

Metadata

Assignees

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