In my application, I use Box2D and Spidermonkey . Both libraries define the uint32 type, which obviously gives me a compiler error when used as in a single compilation unit.
b2settings.h (Box2D): typedef unsigned int uint32;
jsotypes.h (Spidermonkey): typedef unsigned long uint32;
Is there a way to resolve this collision without changing the headers of third-party libraries?
I am grateful for every hint!
You can do this hack:
#define uint32 Box2D_uint32 #include "Box2D.h" #undef uint32 #define uint32 Spider_uint32 #include "Spidermonkey.h" #undef uint32
typedef , ODR, . (struct or inline function), uint32, ODR. , , , , .
typedef
- , , , .
Source: https://habr.com/ru/post/1779742/More articles:Dynamically updating Google calibration information using jquery ajax - from json feed - jsonGrammar for Unix command line options - parsingDoes MS Access Runtime 2010 work well on a system with a previous version of Access / Office? - ms-accessStoring data in memory, what is a good way? - c #View ACCDB with Access 2010 runtime when installing Access 2007 - ms-accessC # facebook graph / How to upload image to Facebook album? - c #SWT: how to create a regular button from an action - javaGeneric reflective helper method for equals and hashCode - javaHow to handle both buttons (left and right simultaneously) with JS / jQuery? - javascriptКакой ISO используется для определения countryId в локали? - javaAll Articles