td icon indicating copy to clipboard operation
td copied to clipboard

Build Error: 'td/tl/tl_jni_object.h' file not found

Open Sarfarazah opened this issue 2 months ago • 1 comments

While running the TDLib build command, the process fails with a missing header error, even though the file exists in the correct path.

command :- cmake --build . --target install

error:

Image Image

td/example/java/td_jni.cpp:14:10: fatal error: 'td/tl/tl_jni_object.h' file not found 14 | #include <td/tl/tl_jni_object.h> | ^~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. make[2]: *** [CMakeFiles/tdjni.dir/td_jni.cpp.o] Error 1 make[1]: *** [CMakeFiles/tdjni.dir/all] Error 2 make: *** [all] Error 2

System Information:

OS: macOS (e.g., 14.x)

CMake version: (e.g., 3.28.0)

Compiler: (e.g., Apple Clang 16.0.0)

Build Folder: /Users/sarfaraz/Desktop/td/build

Repo Path: /Users/sarfaraz/Desktop/td

Command Context: Running inside the TDLib directory.

Observation: The file tl_jni_object.h exists at the following location:

/Users/sarfaraz/Desktop/td/td/tl/tl_jni_object.h

However, the compiler still cannot find it, suggesting that the include path for td/tl may not be set correctly when building the install target.

Sarfarazah avatar Nov 06 '25 13:11 Sarfarazah

You are building the example, not TDLib itself. Make sure that TDLib was successfully built and installed, or just use build instructions provided by https://tdlib.github.io/td/build.html.

levlam avatar Nov 06 '25 14:11 levlam