Build failed with "error C2070: 'const unsigned char []': illegal sizeof operand"

Discussions related to using the OSE version of VirtualBox.

Build failed with "error C2070: 'const unsigned char []': illegal sizeof operand"

Postby Weedon » 15. Aug 2019, 11:35

I am building vbox on Win7 64bit, and stuck in some errors.
The build command is :
Code: Select all   Expand viewCollapse view
cscript configure.vbs --with-sdk="C:\Program Files\Microsoft SDKs\Windows\v7.1" --with-ddk=C:\WinDDK\7600.16385.1 --with-VC="C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC" --with-MinGW-w64=C:\Users\Jhoner\Desktop\virtualbox_tools\mingw64 --with-libSDL=C:\Users\Jhoner\Desktop\virtualbox_tools\SDL-1.2.15\ --with-openssl=C:\Users\Jhoner\Desktop\virtualbox_tools\OpenSSL-Win64\ --with-openssl32=C:\Users\Jhoner\Desktop\virtualbox_tools\OpenSSL-Win32\ --with-libcurl=C:\Users\Jhoner\Desktop\virtualbox_tools\curl64 --with-libcurl32=C:\Users\Jhoner\Desktop\virtualbox_tools\curl32 --with-Qt5=C:\Users\Jhoner\Desktop\qt-5.6.3\qt-5.6.3\qtbase
call env.bat
call kbuild\envwin.cmd --win64 --release

and here is the error message:
Code: Select all   Expand viewCollapse view
\VirtualBox-6.0.8\VirtualBox-6.0.8\out\win.amd64\release\obj\SUPR3\TrustAnchorsAndCerts.cpp(590) : [b]error C2070: 'const unsigned char []': illegal sizeof operand[/b]
\VirtualBox-6.0.8\VirtualBox-6.0.8\out\win.amd64\release\obj\SUPR3\TrustAnchorsAndCerts.cpp(644) : [b]error C2070: 'const unsigned char []': illegal sizeof operand[/b]

It seems that vc++ compiler can not compile with an incomplete type 'const unsigned char []'.
Anyone knows how to solve the problem?
Thanks!
Weedon
 
Posts: 4
Joined: 15. Aug 2019, 11:27

Re: Build failed with "error C2070: 'const unsigned char []': illegal sizeof operand"

Postby mpack » 15. Aug 2019, 14:54

The error messages name files in an output folder, not a source folder, and I don't find source files with those names in the 6.0.8 source tree.

That said, from the error message I would guess that you either have to turn signing off or provide a path to your own certificates: obviously Oracle won't be letting you use theirs.
mpack
Site Moderator
 
Posts: 29692
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Build failed with "error C2070: 'const unsigned char []': illegal sizeof operand"

Postby Weedon » 16. Aug 2019, 03:59

Thanks for the suggestion. I'll try this. :D
Last edited by socratis on 16. Aug 2019, 05:16, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
Weedon
 
Posts: 4
Joined: 15. Aug 2019, 11:27

Re: Build failed with "error C2070: 'const unsigned char []': illegal sizeof operand"

Postby Weedon » 16. Aug 2019, 09:58

mpack wrote:The error messages name files in an output folder, not a source folder, and I don't find source files with those names in the 6.0.8 source tree.

That said, from the error message I would guess that you either have to turn signing off or provide a path to your own certificates: obviously Oracle won't be letting you use theirs.

Excited! After using a certificate generated by myself, the error msg disappeared. But there's a new error relevant to OpenGLES :
Code: Select all   Expand viewCollapse view
qtbase\include\qtgui\../../src/gui/opengl/qopengl.h(104): fatel error C1083: cannot open include file: 'GLES2/gl2.h': No such file or directory.

The source file is in qt-5.6.3, I'v compiled qt-5.6.3 by using vs2010 and the result looks good. Also, I have installed DirectX on my Win7. Any ideas about this?
Look forward to your reply.
Weedon
 
Posts: 4
Joined: 15. Aug 2019, 11:27


Return to VirtualBox OSE

Who is online

Users browsing this forum: No registered users and 2 guests