fix: Undefine Windows macros to prevent conflicts with protobuf generated code
- Added preprocessor directives to undefine the DWORD and ERROR macros on Windows, ensuring compatibility with protobuf generated code in imgui_test_harness_service.h and gui_automation_client.h. - This change prevents potential compilation issues when using gRPC and protobuf in a Windows environment.
This commit is contained in:
@@ -11,6 +11,16 @@
|
|||||||
#include "app/core/service/widget_discovery_service.h"
|
#include "app/core/service/widget_discovery_service.h"
|
||||||
#include "app/core/testing/test_recorder.h"
|
#include "app/core/testing/test_recorder.h"
|
||||||
|
|
||||||
|
// Undefine Windows macros that conflict with protobuf generated code
|
||||||
|
#ifdef _WIN32
|
||||||
|
#ifdef DWORD
|
||||||
|
#undef DWORD
|
||||||
|
#endif
|
||||||
|
#ifdef ERROR
|
||||||
|
#undef ERROR
|
||||||
|
#endif
|
||||||
|
#endif // _WIN32
|
||||||
|
|
||||||
// Include grpcpp headers for unique_ptr<Server> in member variable
|
// Include grpcpp headers for unique_ptr<Server> in member variable
|
||||||
#include <grpcpp/server.h>
|
#include <grpcpp/server.h>
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,15 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#ifdef YAZE_WITH_GRPC
|
#ifdef YAZE_WITH_GRPC
|
||||||
|
// Undefine Windows macros that conflict with protobuf generated code
|
||||||
|
#ifdef _WIN32
|
||||||
|
#ifdef DWORD
|
||||||
|
#undef DWORD
|
||||||
|
#endif
|
||||||
|
#ifdef ERROR
|
||||||
|
#undef ERROR
|
||||||
|
#endif
|
||||||
|
#endif // _WIN32
|
||||||
#include <grpcpp/grpcpp.h>
|
#include <grpcpp/grpcpp.h>
|
||||||
#include "protos/imgui_test_harness.grpc.pb.h"
|
#include "protos/imgui_test_harness.grpc.pb.h"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user