Building VBox 5.0.0 on Win7 - Linking error - il mismatch

Discussions related to using the OSE version of VirtualBox.
Post Reply
NTI
Posts: 21
Joined: 23. Jul 2015, 12:35

Building VBox 5.0.0 on Win7 - Linking error - il mismatch

Post by NTI »

I'm building VBox5.0.0 on a win7 x86 machine. I've followed the official build instruction from https://www.virtualbox.org/wiki/Windows ... structions. But I got an error of Il mismatch between 'P1' version '20100826' and 'P2' version '20081201'.

Error details:

Code: Select all

fatal error C1900: Il mismatch between 'P1' version '20100826' and 'P2' version '20081201'
LINK : fatal error LNK1257: code generation failed
kmk: *** [C:/VBox/VirtualBox-5.0.0/out/win.x86/release/obj/VBoxRT/VBoxRT.dll] Error 1257
The failing command:
@ C:/PROGRA~1/MICROS~2.0/VC/bin/link.exe -nologo -machine:x86
          -Ignore:4197 /NOD /INCREMENTAL:NO /MAPINFO:EXPORTS /LargeAddressAware /DynamicBase /NxCompat /Release /Debug /
Version:500.0 /STUB:C:/VBox/VirtualBox-5.0.0/src/VBox/HostDrivers/Support/win/winstub.com /DISALLOWLIB:libc.lib /DISALLO
WLIB:libcd.lib /DISALLOWLIB:libcmt.lib /DISALLOWLIB:libcmtd.lib /DISALLOWLIB:msvcrtd.lib /DISALLOWLIB:msvcprtd.lib    /M
ANIFEST /delayload:gdi32.dll /delayload:user32.dll /delayload:shell32.dll /delayload:ole32.dll /delayload:oleaut32.dll /
delayload:advapi32.dll    /OUT:C:/VBox/VirtualBox-5.0.0/out/win.x86/release/obj/VBoxRT/VBoxRT.dll /IMPLIB:C:/VBox/Virtua
lBox-5.0.0/out/win.x86/release/obj/VBoxRT/VBoxRT.lib /MAPINFO:EXPORTS /INCREMENTAL:NO /MAP:C:/VBox/VirtualBox-5.0.0/out/
win.x86/release/obj/VBoxRT/VBoxRT.map /DLL  /DEF:C:/VBox/VirtualBox-5.0.0/out/win.x86/release/obj/VBoxRT/VBoxRT.def   /L
IBPATH:C:/PROGRA~1/MICROS~2/Windows/v7.1/Lib  /LIBPATH:C:/WinDDK/7600.16385.1/lib/wlh/i386  /LIBPATH:C:/PROGRA~1/MICROS~
2/Windows/v7.1/Lib @C:/VBox/VirtualBox-5.0.0/out/win.x86/release/obj/VBoxRT/VBoxRT.rsp
kmk: *** [C:/VBox/VirtualBox-5.0.0/out/win.x86/release/obj/VBoxRT/VBoxRT.dll] Deleting file `C:/VBox/VirtualBox-5.0.0/ou
t/win.x86/release/obj/VBoxRT/VBoxRT.rsp'
I guess it's because of the libraries (SDL, libcurl, openssl) that I downloaded do not match with each other. Do I need to build all of them locally? (I have only built QT4 by myself.) Or it is because of something else?

Commands that I used for building VBox:

Code: Select all

cscript configure.vbs --with-libSDL=C:\VBox\SDL-devel-1.2.15-VC\SDL-1.2.15 --with-openssl=C:\VBox\openssl-0.9.8k_WIN32 --with-libcurl=C:\VBox\curl-7.40.0-devel-mingw32 --with-QT4=C:\VBox\qt-4.7.3 --with-MinGW32=C:\VBox\MinGW32-3.3.3

env.bat

kmk
NTI
Posts: 21
Joined: 23. Jul 2015, 12:35

Re: Building VBox 5.0.0 on Win7 - Linking error - il mismatc

Post by NTI »

One thing I realised is that the curl (v7.40.0) binary that I downloaded is for win2000/XP. But that's the only version I can find from http://curl.haxx.se/download.html which contains the required libraries by VBox. It also seems to be a version with SSL enabled.

I can't find a closer version anywhere else.
NTI
Posts: 21
Joined: 23. Jul 2015, 12:35

Re: Building VBox 5.0.0 on Win7 - Linking error - il mismatc

Post by NTI »

I used Visual Studio 2010 compiler to build QT and also for VBox. But I'm confused now about whether I should use gcc compiler to do it? Which compiler am I supposed to use for building VBox, VS or gcc?
mhanor
Volunteer
Posts: 321
Joined: 7. Oct 2009, 12:40
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: various

Re: Building VBox 5.0.0 on Win7 - Linking error - il mismatc

Post by mhanor »

The VirtualBox build system uses gcc and VC for building the VirtualBox components.
Your initial linking error is caused by your attempt at linking objects that were compiled with different VC compilers. My advice is to build yourself the required dlls/libraries (qt, curl, openssl, etc).
Post Reply