Hello,
I am trying to compile telegram on my own, i've followed the guide for Visual Studio 2015 https://github.com/telegramdesktop/tdesktop/blob/master/doc/building-msvc.md
I've builded eveything successfully even fffmpg but when i had to configure and make with msys64 it failed
I did as shown here https://github.com/telegramdesktop/tdesktop/blob/master/doc/building-msvc.md#ffmpeg
PATH="/c/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN:$PATH"
cd /d/TBuild/Libraries/ffmpeg
pacman -Sy
pacman -S msys/make
pacman -S mingw64/mingw-w64-x86_64-opus
pacman -S diffutils
pacman -S pkg-config
PKG_CONFIG_PATH="/mingw64/lib/pkgconfig:$PKG_CONFIG_PATH"
./configure --toolchain=msvc --disable-programs --disable-doc --disable-everything --enable-protocol=file --enable-libopus --enable-decoder=aac --enable-decoder=aac_latm --enable-decoder=aasc --enable-decoder=flac --enable-decoder=gif --enable-decoder=h264 --enable-decoder=mp1 --enable-decoder=mp1float --enable-decoder=mp2 --enable-decoder=mp2float --enable-decoder=mp3 --enable-decoder=mp3adu --enable-decoder=mp3adufloat --enable-decoder=mp3float --enable-decoder=mp3on4 --enable-decoder=mp3on4float --enable-decoder=mpeg4 --enable-decoder=msmpeg4v2 --enable-decoder=msmpeg4v3 --enable-decoder=wavpack --enable-decoder=opus --enable-decoder=vorbis --enable-decoder=wmalossless --enable-decoder=wmapro --enable-decoder=wmav1 --enable-decoder=wmav2 --enable-decoder=wmavoice --enable-encoder=libopus --enable-hwaccel=h264_d3d11va --enable-hwaccel=h264_dxva2 --enable-parser=aac --enable-parser=aac_latm --enable-parser=flac --enable-parser=h264 --enable-parser=mpeg4video --enable-parser=mpegaudio --enable-parser=opus --enable-parser=vorbis --enable-demuxer=aac --enable-demuxer=flac --enable-demuxer=gif --enable-demuxer=h264 --enable-demuxer=mov --enable-demuxer=mp3 --enable-demuxer=ogg --enable-demuxer=wav --enable-muxer=ogg --enable-muxer=opus --extra-ldflags="-libpath:/d/TBuild/Libraries/opus/win32/VS2010/Win32/Release celt.lib silk_common.lib silk_float.lib"
I got an error:
```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.
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.
The console.log:
```check_cc
BEGIN ./ffconf.EcqvlWlj.c
1 int main(void){ return 0; }
END ./ffconf.EcqvlWlj.c
cl -nologo -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -c -Fo./ffconf.5JaZ5gXY.o ./ffconf.EcqvlWlj.c
ffconf.EcqvlWlj.c
./compat/windows/mslink -libpath:/d/TBuild/Libraries/opus/win32/VS2010/Win32/Release celt.lib silk_common.lib silk_float.lib -nologo -out:./ffconf.g0jAgGX0.exe ./ffconf.5JaZ5gXY.o
LINK : fatal error LNK1104: cannot open file 'LIBCMT.lib'
C compiler test failed.
Operating system: Windows 7
Version of Telegram Desktop: 0.10.19
I had the same problem.
The instructions are not very clear, but you have to open msys from the VS2015 x86 Native Tools Command Prompt.
@BlackLanzer thanks that worked!
"not very clear"? xD
All commands (if not stated otherwise) will be launched from VS2015 x86 Native Tools Command Prompt.bat (should be in Start Menu > Programs > Visual Studio 2015 menu folder).
Go to D:\msys64 and launch msys2_shell.bat, there run
In my opinion it looks like you can run it without the native tools.
Create a PR and make it better ;)
I have the same problem but the difference is that there is no such msys2_shell.bat file. there is msys2_shell.cmd which opens new command prompt window with msys2 style.
This msys2_shell.bat has been removed from msys2 and replaced with msys2_shell.cmd. what should we do ?
@ray-pixar
_In instructions:_ launch msys2_shell.bat
This msys2_shell.bat has been removed from msys2 and replaced with msys2_shell.cmd
What do you think?
But to be serious, I guess PR would be welcome.
what is PR ?
I'm getting this error in config.log:
LINK : fatal error LNK1104: cannot open file 'LIBCMT.lib'
now I am getting this error:
ERROR: opus not found using pkg-config
very thanks.@BlackLanzer l you solved my question.hhhh
Most helpful comment
I had the same problem.
The instructions are not very clear, but you have to open msys from the VS2015 x86 Native Tools Command Prompt.