Discussion:
[vbox-dev] Qt C++ Vbox (Klaus Espenlaub)
Sanchir Kartiev
2014-09-03 15:17:36 UTC
Permalink
Klaus, Thank you! Now I wrote
#define RT_OS_LINUX
#define IN_RINGO
#define VBOX_WITH_XPCOM

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?
Thanks.

My config:
Debian Linux 7, Intel Core i3. Qt 5.3.1, Qt Creator
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.virtualbox.org/pipermail/vbox-dev/attachments/20140903/2681532c/attachment.html
Klaus Espenlaub
2014-09-03 16:02:19 UTC
Permalink
Sanchir,
Post by Sanchir Kartiev
#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.
Post by Sanchir Kartiev
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
Post by Sanchir Kartiev
Thanks.
Debian Linux 7, Intel Core i3. Qt 5.3.1, Qt Creator
Loading...