Kodi Community Forum

Full Version: Error occurs while setting up build environment in xbmc
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I couldn't setup build environment in kodi v18. While compiling bat files am getting this kind of error,
"LINK : fatal error LNK1104: cannot open file 'LIBCMT.lib'
C compiler test failed".

Does someone suggest me how to fix it.
You have to give more info.
For what platform are you compiling?
What have you done already?
We compiling For windows 7 64 bit.  Visual studio version 12.0

The following path i have add to Environment Variable

i) C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\cl.exe;
ii) C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin;
iii) C:\MinGW\bin;C:\MinGW\msys\1.0\bin;
iv) C:\cmake-3.11.0-rc4-win64-x64\bin;
v) C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib;

1) I  have downloaded Kodi Source 18.0
2) Executed download-dependencies.bat from "xbmc\tools\buildsteps\windows\x64" it's downloaded all required dependencies
3) Next by running download-msys2.bat  there is no issue
4) When am run make-mingwlibs.bat  file am getting error

Error 1
    First i got error in command prompt "ERROR! Could not find vcvarsall.bat"

Error 2
I got this error message from mingw.
cl is unable to create an executable file.
If cl is a cross-compiler, use the --enable-cross-compile option.
Only do this if you know what cross compiling means.
C compiler test failed.

failed to compile /xbmc/project/BuildDependencies/mingwlibs/win32/bin/avcodec-57.dll

Error 3

So when i opened the config.log file from the path "xbmc\project\BuildDependencies\build\ffmpeg-x64\ffbuild"
There is a error like

/build/src/ffmpeg-f96fd5c9f7/compat/windows/mslink -LIBPATH:/local64/lib -LIBPATH:/mingw64/lib -LIBPATH:/depends/x64/lib -nologo -out:./ffconf.DeUN3jzu/test.exe ./ffconf.DeUN3jzu/test.o

LINK : fatal error LNK1104: cannot open file 'LIBCMT.lib'
C compiler test failed.
Where did you read that Visual Studio 12 is supported for building Kodi?
Thread moved to the Windows section
Am sorry, if i do with visual studio 17 it will work fine?
Visual Studio 14 (2015) and Visual Studio 15 (2017) are both supported.
As you use Windows 7 you have to deselect the Windows SDK 8.1 in the installer, otherwise you will get another error.