I follow the instruction of "visual studio 2015".
but I was blocked by the Qt static lib compile.
After I typed nmake , the compiler report an error:
QtBootstrapd.lib(qbytearray.obj) : error LNK2019: 无法解析的外部符号 _z_compress2,该符号在函数 "class QByteArray __cdecl qCompress(unsigned char const *,int,int)" (?qCompress@@YA?AVQByteArray@@PBEHH@Z) 中被引用
QtBootstrapd.lib(qbytearray.obj) : error LNK2019: 无法解析的外部符号 _z_uncompress,该符号在函数 "class QByteArray __cdecl qUncompress(unsigned char const *,int)" (?qUncompress@@YA?AVQByteArray@@PBEH@Z) 中被引用
......\bin\moc.exe : fatal error LNK1120: 2 个无法解析的外部命令.
(sorry about the chinese)
it means that the _z_compress2&_z_uncompress are the external symbols ,but can't find the definition .
So I guess : the nmake doesn't build the 3rdparty source code .
so the moc.exe can't be generated( the _z_compress2&_z_uncompress are defined in the zlib in 3rdparty).
anyone has this problems ? please help me .
thanks.
Looks like QTBUG-33357, btw
@stek29
yes,it does.
but I add the -DZ_PREFIX into DEFINES of Makefile.Debug&Makefile.Release , the error still exists.
I don't know how to resolve it.
@stek29
it seems that the qt makefile doesn't use the zlib.pri but choose to use the zlib_dependency.pri,but in fact my system don't have the zlib.
So I modify the bootstrap.pro:
contains(QT_CONFIG, zlib)|cross_compile {
include(../../3rdparty/zlib.pri)
} else {
CONFIG += no_core_dep
include(../../3rdparty/zlib_dependency.pri)
}
to :
include(../../3rdparty/zlib.pri)
force the bootstrap compile the zlib , then it didn't report the "undefined" issue.
but other problems occur.
WTF, I'm messed up by this accident.
@lianzisong how do you fixed it. laotie
Sorry, I didn't fix it ,I gave up at last .
2017-09-18 16:02 GMT+08:00 youncoo notifications@github.com:
@lianzisong https://github.com/lianzisong how do you fixed it. laotie
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/telegramdesktop/tdesktop/issues/3702#issuecomment-330151873,
or mute the thread
https://github.com/notifications/unsubscribe-auth/APllFBQMyWr7WryFWeGkicEbGwi32rT5ks5sjiN6gaJpZM4OifmS
.
Same error....(jbdxbl laotie @youncoo
I tried to recompile openssl with zlib(telegram version), but still the same error...
Anyone has figured it out?
Any workarounds for the issue?
Or may be it's possible to switch to newer Qt version?
@theodysseus Currently the instructions are for Visual Studio 2017 and they should work (I've set up a new build environment following them not so long ago, perhaps with some slight tuning, I don't remember exactly). What is your problem?
Eight days ago I set up a new environment in a new Windows Server 2008 VM, follewed all the instructions, and got the error.
Could you please publish a new release? The bug that interrupts IME is annoying, I can hardly input Chinese fluently.
@john-preston the same as described by issue author - error LNK2019 in qCompress/qUncompress(). And it is indeed similar to QTBUG-33357, that was fixed in Qt 5.8, but was not backported.
I had the same problem but I noticed that after running "configure" as written in the doc, the script output a warning message like "extra characters on line 20 of (path)\config.pri".
I checked the file "config.pri" and I noticed that at the end of the file, something went wrong.
After the line: QT_CL_PATCH_VERSION = 25547 per x86
There was: Copyright (C) Microsoft Corporation
I removed the last line and it worked.
@chaplin89 tried it with no effect :(
jom clean
jom -j4
error still appears
@john-preston
with some slight tuning
What kind of tuning? Maybe something is missing?
On board - Windows 8.1 (not eng version), Visual Studio 2017, 8.1-10 windows kits included.
How i can help to figure it out?
I tryied build with -qt-zlib, -system-zlib, changed bootstrap.pro, makefiles. Maybe I'm doing something wrong, error still appears.
Btw, If i build a project in VS i get this, errors are related.
I don't know what to suggest. Right now I've launched the "x86 Native Tools Command Prompt for VS 2017" and launched in a separate folder those commands from the current instructions:
git clone https://github.com/openssl/openssl.git
cd openssl
git checkout OpenSSL_1_0_1-stable
perl Configure no-shared --prefix=%cd%\Release --openssldir=%cd%\Release VC-WIN32
ms\do_ms
nmake -f ms\nt.mak
nmake -f ms\nt.mak install
nmake -f ms\nt.mak clean
perl Configure no-shared --prefix=%cd%\Debug --openssldir=%cd%\Debug debug-VC-WIN32
ms\do_ms
nmake -f ms\nt.mak
nmake -f ms\nt.mak install
cd ..
git clone git://code.qt.io/qt/qt5.git qt5_6_2
cd qt5_6_2
perl init-repository --module-subset=qtbase,qtimageformats
git checkout v5.6.2
cd qtimageformats
git checkout v5.6.2
cd ..\qtbase
git checkout v5.6.2
git apply ../../../tdesktop/Telegram/Patches/qtbase_5_6_2.diff
cd ..
configure -debug-and-release -force-debug-info -opensource -confirm-license -static -I "%cd%\..\openssl\Release\include" -no-opengl -openssl-linked OPENSSL_LIBS_DEBUG="%cd%\..\openssl\Debug\lib\ssleay32.lib %cd%\..\openssl\Debug\lib\libeay32.lib" OPENSSL_LIBS_RELEASE="%cd%\..\openssl\Release\lib\ssleay32.lib %cd%\..\openssl\Release\lib\libeay32.lib" -mp -nomake examples -nomake tests -platform win32-msvc2015
jom -j4
jom -j4 install
cd ..
And all of them worked without errors, everything was built (openssl and Qt).
The same issue. Anyone solve this?
I had the same issue on a non english windows. Building on a virtual machine with Windows 10 En solved it.
using english windows version build works like it should.
building on a german version of windows required to edit the .pri-file mentioned by @Yumash in https://github.com/telegramdesktop/tdesktop/issues/3702#issuecomment-348230951
Running on Canadian English gave errors on the first go around. The instructions here: https://github.com/telegramdesktop/tdesktop/issues/3702#issuecomment-350665584 worked for me.
I faced this build error issue and I've found the workaround solution.
It's dirty but maybe working well in your environment too.
! please check your compiler version to execute cl.exe in cmd.exe by yourself and then fix the version number text above. MUST BE ENGLISH TEXT!
@darkdaddy it work for me. 灰常霸气
@darkdaddy it works, thanks!
@darkdaddy I used your method,but still error,pls help
@kenshinyelin test "nmake" after "configure ..."
git clone git://code.qt.io/qt/qt5.git qt5_6_2
cd qt5_6_2
perl init-repository --module-subset=qtbase,qtimageformats
git checkout v5.6.2
cd qtimageformats
git checkout v5.6.2
cd ..\qtbase
git checkout v5.6.2
git apply ../../../tdesktop/Telegram/Patches/qtbase_5_6_2.diff
cd ..
configure -debug-and-release -force-debug-info -opensource -confirm-license -static -I "%cd%\..\openssl\Release\include" -no-opengl -openssl-linked OPENSSL_LIBS_DEBUG="%cd%\..\openssl\Debug\lib\ssleay32.lib %cd%\..\openssl\Debug\lib\libeay32.lib" OPENSSL_LIBS_RELEASE="%cd%\..\openssl\Release\lib\ssleay32.lib %cd%\..\openssl\Release\lib\libeay32.lib" -mp -nomake examples -nomake tests -platform win32-msvc2015
nmake
jom -j4
jom -j4 install
Open Developer Command Prompt for VS 2017
it works
Most helpful comment
I faced this build error issue and I've found the workaround solution.
It's dirty but maybe working well in your environment too.
//QString version = execute(command, &returnValue);
QString version = "Microsoft (R) C/C++ Optimizing Compiler Version 19.12.25835 for x86";
! please check your compiler version to execute cl.exe in cmd.exe by yourself and then fix the version number text above. MUST BE ENGLISH TEXT!