VBox/com/array.h assertion failure
Posted: 7. Nov 2013, 23:32
Hi all,
I'm trying to build code using the COM/XPCOM "glue" layer in C++ with VirtualBox 4.3.2. This is on both Linux and OS X -- so the XPCOM side of things. The VBox source tree's "include" directory is in my include path. After defining RT_ARCH_* and RT_OS_* as needed, I have:
#include <VBox/com/com.h>
#include <VBox/com/array.h>
The second line causes an assertion failure on line 265 of array.h:
AssertCompile(sizeof(PRUnichar) == sizeof(OLECHAR));
PRUnichar is 2 bytes, but OLECHAR is defined in VBox/com/defs.h line 315:
#define OLECHAR wchar_t
which is 4 bytes on Linux. I don't see any VBox preprocessor macros that would change this definition.
Am I missing some #define, compiler flag, or other setup? The regular VirtualBox code uses array.h and builds just fine (e.g., src/VBox/Main/testcase/tstAPI.cpp). But I don't see how it avoids wchar_t != PRUnichar.
Thanks!
I'm trying to build code using the COM/XPCOM "glue" layer in C++ with VirtualBox 4.3.2. This is on both Linux and OS X -- so the XPCOM side of things. The VBox source tree's "include" directory is in my include path. After defining RT_ARCH_* and RT_OS_* as needed, I have:
#include <VBox/com/com.h>
#include <VBox/com/array.h>
The second line causes an assertion failure on line 265 of array.h:
AssertCompile(sizeof(PRUnichar) == sizeof(OLECHAR));
PRUnichar is 2 bytes, but OLECHAR is defined in VBox/com/defs.h line 315:
#define OLECHAR wchar_t
which is 4 bytes on Linux. I don't see any VBox preprocessor macros that would change this definition.
Am I missing some #define, compiler flag, or other setup? The regular VirtualBox code uses array.h and builds just fine (e.g., src/VBox/Main/testcase/tstAPI.cpp). But I don't see how it avoids wchar_t != PRUnichar.
Thanks!