tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

How to install cmake3 #2977

Closed handsomeQPO closed 3 months ago

handsomeQPO commented 3 months ago

I am a new scholar, as I follow the steps of this tutorial https://tdlib.github.io/td/build.html command line output error No package cmake3 available. How to install cmake3?please teach me,thanks

levlam commented 3 months ago

This depends on you operating system and package manager.

handsomeQPO commented 3 months ago

My system is Centos7

levlam commented 3 months ago

Then you can choose CentOS 7 in the build instruction generator to get exact build instructions.

levlam commented 3 months ago

The package cmake3 has been previously available. CentOS 7 isn't supported anymore, so there can be issues with its package manager right now. You can also install CMake manually from https://cmake.org/download/.

handsomeQPO commented 3 months ago

There is a CMake environment on my machine,do I need to configure a soft chain?

handsomeQPO commented 3 months ago

The basic environment has been improved,but cmake --build . --target install ,console output error during command execution

handsomeQPO commented 3 months ago

such as /td/tdutils/td/utils/unique_ptr.h:40:30: error: expected type-specifier

levlam commented 3 months ago

This looks like an error from an old g++ version. Make sure to install all packages mentioned by the build instructions generator before running CMake for the first time. Delete build directory and recreate it if you have run CMake without some packages installed.

handsomeQPO commented 3 months ago

My version is 4.8.5, it may be too old

handsomeQPO commented 3 months ago

when I execute cmake -- build-- target install,scann CMake Error: The source directory "/home/NetPF/td/build/CMakeFiles/progress.marks" does not appear to contain CMakeLists.txt, why is this ?

levlam commented 3 months ago

You run the command from a wrong directory.

handsomeQPO commented 3 months ago

Where should I execute it?/td/build/ or /td/ ???

handsomeQPO commented 3 months ago

I encountered this error while executing in the/td/build/directory

levlam commented 3 months ago

You need to follow the build instructions https://tdlib.github.io/td/build.html and don't change directories between commands.