From 4b590788d111def43af6c2437e44826b6d08be09 Mon Sep 17 00:00:00 2001 From: Gust Date: Thu, 12 Dec 2024 22:05:16 +0800 Subject: [PATCH] update j2c cmake config --- j2c/app/vm/native_std.c | 2 ++ j2c/build/.gitignore | 4 ++-- j2c/build/build_console_winx64.bat | 2 +- j2c/translator/src/main/java/com/ebsee/j2c/AssistLLVM.java | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/j2c/app/vm/native_std.c b/j2c/app/vm/native_std.c index 4671d246..62881b60 100755 --- a/j2c/app/vm/native_std.c +++ b/j2c/app/vm/native_std.c @@ -33,6 +33,8 @@ #include #include +c8 *inet_ntop(s32 af, const void *src, c8 *dst, socklen_t size); + #if __JVM_OS_VS__ #include "../utils/dirent_win.h" #include "../utils/tinycthread.h" diff --git a/j2c/build/.gitignore b/j2c/build/.gitignore index 8021db18..c966c792 100644 --- a/j2c/build/.gitignore +++ b/j2c/build/.gitignore @@ -1,8 +1,8 @@ .DS_Store .idea - +csource.txt Thumbs.db - +*.exe app tools diff --git a/j2c/build/build_console_winx64.bat b/j2c/build/build_console_winx64.bat index 0614ce82..04b31d08 100644 --- a/j2c/build/build_console_winx64.bat +++ b/j2c/build/build_console_winx64.bat @@ -50,7 +50,7 @@ call :build_jar translator.jar ..\translator\src\main "tools" "." "." %JAVA_HOME%\bin\java -cp tools/translator.jar com.ebsee.Main ../../minijvm/java/src/main/java/;../../test/minijvm_test/src/main/java/ ../app/generted/classes/ ../app/generted/c/ rem ============================================================== -echo [INFO]build app.exe +echo [INFO]build app.exe , maybe take a while call :jvm_compile app.exe ..\app %TARGETDIR% echo completed. diff --git a/j2c/translator/src/main/java/com/ebsee/j2c/AssistLLVM.java b/j2c/translator/src/main/java/com/ebsee/j2c/AssistLLVM.java index 2b91487e..5d400f01 100755 --- a/j2c/translator/src/main/java/com/ebsee/j2c/AssistLLVM.java +++ b/j2c/translator/src/main/java/com/ebsee/j2c/AssistLLVM.java @@ -302,7 +302,7 @@ static private void genTypeDef(PrintStream ps) { static private void genJNI(String outpath) { try { - File f = new File(outpath + "/native_gen.txt"); + File f = new File(outpath + "/_native_gen.txt"); FileOutputStream fos = new FileOutputStream(f); PrintStream ps = new PrintStream(fos);