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

building the tdlib project in java #2384

Closed paraleped closed 1 year ago

paraleped commented 1 year ago

hello when i try to build a java project i get the following error:

when i try to build a java project i get the following error:

`MSBuild version 17.5.1+f6fdcf537 for .NET Framework

Generating Java TDLib API source files
  Building Java code
  C:\Users\T\Desktop\t\td\example\java\org\drinkless\tdlib\Client.java:229: warning: [removal] finalize() in Obje
  ct has been deprecated and marked for removal
      protected void finalize() throws Throwable {
                     ^
  1 warning
  Generating Javadoc documentation
  Loading source files for package org.drinkless.tdlib...
CUSTOMBUILD : error : No source files for package org.drinkless.tdlib [C:\Users\T\Desktop\t\td\example\java\build
\generate_javadoc.vcxproj] D:\N\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(247,5): error MSB8066: custom assembly for "C:\Users\T\Desktop\t\td\example\java\build\CMakeFiles\38a1aee34003018bfa3f2a5c470b9fa0\generate_javadoc.rul
e;C:\Users\T\Desktop\t\td\example\java\CMakeLists.txt" exited with code 2.
 [C:\Users\T\Desktop\t\td
\example\java\build\generate_javadoc.vcxproj]`

this happens after trying to enter:

etc\td\example\java\build> cmake --build . --target install

*I have windows x64

levlam commented 1 year ago
  C:\Users\T\Desktop\t\td\example\java\org\drinkless\tdlib\Client.java:229: warning: [removal] finalize() in Obje
  ct has been deprecated and marked for removal
      protected void finalize() throws Throwable {
                     ^
  1 warning

This is a warning and not an error. Also, finalize usage is absolutely correct in the class and it is sad that Java forces us to remove it, because someone used it incorrectly.

Did you follow https://tdlib.github.io/td/build.html?language=Java?

paraleped commented 1 year ago

@levlam that's the problem:

CUSTOMBUILD : error : No source files for package org.drinkless.tdlib [C:\Users\T\Desktop\t\td\example\java\build
\generate_javadoc.vcxproj] D:\N\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(247,5): error MSB8066: custom assembly for "C:\Users\T\Desktop\t\td\example\java\build\CMakeFiles\38a1aee34003018bfa3f2a5c470b9fa0\generate_javadoc.rul
e;C:\Users\T\Desktop\t\td\example\java\CMakeLists.txt" exited with code 2.
 [C:\Users\T\Desktop\t\td
\example\java\build\generate_javadoc.vcxproj]`

not the finalize

p.s https://tdlib.github.io/td/build.html?language=Java" i used this resource

levlam commented 1 year ago

This is not the problem. It is consequences of failures on previous steps, or the files at C:\Users\T\Desktop\t\td \example\java\org\drinkless\tdlib were deleted somehow. The full log for all commands from https://tdlib.github.io/td/build.html?language=Java should contain the cause.