[vbox-dev] Qt C++ Vbox (Klaus Espenlaub)

Klaus Espenlaub klaus.espenlaub at oracle.com
Wed Sep 3 16:02:19 UTC 2014


Sanchir,

On 03.09.2014 17:17, Sanchir Kartiev wrote:
> Klaus, Thank you! Now I wrote
> #define RT_OS_LINUX
> #define IN_RINGO
> #define VBOX_WITH_XPCOM

you should NOT need IN_RING0, this can only cause problems. 
VBOX_WITH_XPCOM should be automatically detected based on RT_OS_...
You missed VBOX_WITH_XPCOM_NAMESPACE_CLEANUP, too.

Also I wonder why you do it this way, normally these defines are 
specified in the compiler command line, see below.

> But I have some errors now: in file array.h - method static void Copy()
> 1) conflicting declaration int com::RTASSERTVAR[0]
> 2) com::RTASSERTVAR has a previous declaration as int com::RTASSERTVAR[1].
> 3) conflicting declaration int com::RTASSERTVAR[0]
> 4) com::RTASSERTVAR has a previous declaration as int com::RTASSERTVAR[1].
> How can I resolve it?

These are compile time assertions which fail... I guess it's the first 
two AssertCompile ones which check the size of the Utf16 char type to be 
consistent. It means you forgot to make sure that you're compiling the 
code with -fshort-wchar. Again see the sample makefile, it contains all 
these details.

In other words, make sure that you compile with
g++ -fshort-wchar -DRT_OS_LINUX -DVBOX_WITH_XPCOM_NAMESPACE_CLEANUP
plus whatever options you need for the rest of your code.

Klaus
> Thanks.
>
> My config:
> Debian Linux 7, Intel Core i3. Qt 5.3.1, Qt Creator



More information about the vbox-dev mailing list