Libtorch 2.1.1 build error in linux

Hi all,
I tried to include torch in my script, by:

#include <torch/script.h>
#include <torch/torch.h>

but I got the following errors when I tried to build a C++ project using libtorch:

In file included from /usr/local/libtorch/include/torch/script.h:3:
In file included from /usr/local/libtorch/include/torch/csrc/api/include/torch/types.h:3:
In file included from /usr/local/libtorch/include/ATen/ATen.h:9:
In file included from /usr/local/libtorch/include/ATen/DeviceGuard.h:3:
In file included from /usr/local/libtorch/include/ATen/core/IListRef.h:632:
In file included from /usr/local/libtorch/include/ATen/core/IListRef_inl.h:3:
In file included from /usr/local/libtorch/include/ATen/core/List.h:490:
In file included from /usr/local/libtorch/include/ATen/core/List_inl.h:4:
In file included from /usr/local/libtorch/include/ATen/core/ivalue.h:4:
/usr/local/libtorch/include/ATen/core/TensorBody.h:891:42: error: default arguments can only be specified for parameters in a function declaration
at::Tensor logit(c10::optional eps=c10::nullopt) const;
^ ~~~~~~~~~~~~
/home/{path to another file. h}:12:24: note: expanded from macro ‘logit’
#define logit(x) (log((x) / (1 - (x))))
^
In file included from /home/{path to file3.cc}:61:
In file included from /home/{path to file4.h}:3:
In file included from /usr/local/libtorch/include/torch/script.h:3:
In file included from /usr/local/libtorch/include/torch/csrc/api/include/torch/types.h:3:
In file included from /usr/local/libtorch/include/ATen/ATen.h:9:
In file included from /usr/local/libtorch/include/ATen/DeviceGuard.h:3:
In file included from /usr/local/libtorch/include/ATen/core/IListRef.h:632:
In file included from /usr/local/libtorch/include/ATen/core/IListRef_inl.h:3:
In file included from /usr/local/libtorch/include/ATen/core/List.h:490:
In file included from /usr/local/libtorch/include/ATen/core/List_inl.h:4:
In file included from /usr/local/libtorch/include/ATen/core/ivalue.h:4:
/usr/local/libtorch/include/ATen/core/TensorBody.h:891:20: error: C++ requires a type specifier for all declarations
at::Tensor logit(c10::optional eps=c10::nullopt) const;
^
/usr/local/libtorch/include/ATen/core/TensorBody.h:891:14: error: expected ‘)’
at::Tensor logit(c10::optional eps=c10::nullopt) const;

Versions:
libtorch version: 2.1.1
cuda: 12.1
C++:17
OS: Ubuntu 22.04.3 LTS(X86_64)

This problem has been solved, a macro ‘logit’ defined in my project conflicted with the Python script.