tdesktop icon indicating copy to clipboard operation
tdesktop copied to clipboard

Build error in cpp under windows

Open 50u1w4y opened this issue 2 years ago • 3 comments

I am following the official document to build tdesktop for some test purpose.

My environment is the same as the document which is:

VS 2022(17.1.0) 10.0.22000.0 SDK c++ 20

Until run configure.bat everything works well. However, when using the generated Telegram.sln to build, there are some errors.

First, when compile many cpps, it will cause use of undefined type 'Data::Media' and can't delete an incomplete type error. The declaration is from history/view/media/history_view_media_common.h.

The second error is when compile Telegram\SourceFiles\chat_helpers\tabbed_selector.cpp it will get 'ChatHelpers::StickersListWidget::Sticker *': unknown size. The declaration is from chat_helpers\stickers_list_widget.h.

I am not good at cpp, so I don't know it's my configuration error or build error.

Hope to get your help, thank you.

50u1w4y avatar Feb 22 '22 03:02 50u1w4y

@50u1w4y you can try to cherry-pick this commit:

https://github.com/telegramdesktop/tdesktop/commit/2be458c9dbebc707afb4570a3068295ee87be12d

I'm not sure if this is a 17.1.0 regression or tdesktop code was not enough C++20-conformant (it was building successfully by GCC 10 / AppleClang 13 / MSVC 17.0), but the mentioned commit fixed the build for me.

john-preston avatar Feb 22 '22 15:02 john-preston

Thank you for your reply, it works for me too.

But is only replacing the 4 changed files stable? Or I need to clone the full design branch?

I only use the commit files to replace the original files in default branch, the tdesktop seems working well now.

50u1w4y avatar Feb 23 '22 02:02 50u1w4y

Hey there!

This issue was inactive for a long time and will be automatically closed in 30 days if there isn't any further activity. We therefore assume that the user has lost interest or resolved the problem on their own.

Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the issue.

Thanks!

github-actions[bot] avatar Sep 05 '22 02:09 github-actions[bot]