-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile issues #1
Comments
`Searching 27 files for "arr_body" E:\Projects\Setup\miniJVM\java2c-master\java2c-master\app\vm\native_std.c: 2 matches in 1 file`
There isn't any define for arr_body, path_arr, name_arr, jnienv |
update code ,recompile it |
Still dont have denfination for arr_body, path_arr, name_arr, jnienv in native_std.c. So I changed:
In jvm.c file: The Gcc dont recognize #pragma direct for winsock and pthread library so I insert Cmake code
what is the problem? Thanks. |
fixed win platform |
It lost sched_yield function on linking, so I added pthread on Cmake
|
fix and tested on mingw32 |
Thank you for your previous reply in /mini_jvm
I have some problems when compile minijvm_rt.jar to C code
but file generated "metadata.h" have struct
struct java_lang_Class {InstProp prop; VMTable* vm_table; struct java_lang_ClassLoader* classLoader_3; struct java_lang_String* name_4; JArray * enumConstants_5; struct java_util_Map* enumConstantDirectory_6; s64 classHandle_7; struct org_mini_reflect_ReflectClass* refClass_8;};
it's not compatible with default jvc.c, native_std.c :
JObject *ins_of_Class_create_get(JThreadRuntime *runtime, JClass *clazz) { JClass *java_lang_class = g_procache.java_lang_class_raw->clazz; if (java_lang_class) { if (clazz->ins_of_Class) { return clazz->ins_of_Class; } else { struct java_lang_Class *ins = (struct java_lang_Class *) new_instance_with_class(runtime, java_lang_class); gc_refer_hold(ins); Java_java_lang_Class__init____V(runtime, ins); clazz->ins_of_Class = (__refer) ins; ins->classHandle_6 = (s64) (intptr_t) clazz;//todo , find it use field refer return (JObject *) ins; } } return NULL; }
So I changed classHandle_6 to classHandle_7, before that vm/.c file could be compiled to .obj file
so I remove {GUI_FILES} in CMake, it ran OK, compiled all /out/c/*c file to obj
But there are errors at last combination:
CMakeFiles\ccjvm.dir/objects.a(com.sun.cldc.util.mini.TimeZoneImpl.c.obj):com.sun.cldc.util.mini.TimeZoneImpl.c:(.text+0x4938e): undefined reference to
new_instance_with_classraw_index'CMakeFiles\ccjvm.dir/objects.a(com.sun.cldc.util.mini.TimeZoneImpl.c.obj):com.sun.cldc.util.mini.TimeZoneImpl.c:(.text+0x49408): undefined reference to
construct_string_with_utfraw_index' CMakeFiles\ccjvm.dir/objects.a(com.sun.cldc.util.mini.TimeZoneImpl.c.obj):com.sun.cldc.util.mini.TimeZoneImpl.c:(.text+0x49445): undefined reference to
new_instance_with_classraw_index'CMakeFiles\ccjvm.dir/objects.a(com.sun.cldc.util.mini.TimeZoneImpl.c.obj):com.sun.cldc.util.mini.TimeZoneImpl.c:(.text+0x49488): undefined reference to
throw_exception' CMakeFiles\ccjvm.dir/objects.a(com.sun.cldc.util.mini.TimeZoneImpl.c.obj):com.sun.cldc.util.mini.TimeZoneImpl.c:(.text+0x49571): undefined reference to
new_instance_with_classraw_index'CMakeFiles\ccjvm.dir/objects.a(com.sun.cldc.util.mini.TimeZoneImpl.c.obj):com.sun.cldc.util.mini.TimeZoneImpl.c:(.text+0x495b4): undefined reference to
throw_exception' CMakeFiles\ccjvm.dir/objects.a(com.sun.cldc.util.mini.TimeZoneImpl.c.obj):com.sun.cldc.util.mini.TimeZoneImpl.c:(.text+0x495ee): undefined reference to
new_instance_with_classraw_index'CMakeFiles\ccjvm.dir/objects.a(com.sun.cldc.util.mini.TimeZoneImpl.c.obj):com.sun.cldc.util.mini.TimeZoneImpl.c:(.text+0x49631): undefined reference to
throw_exception' CMakeFiles\ccjvm.dir/objects.a(com.sun.cldc.util.mini.TimeZoneImpl.c.obj):com.sun.cldc.util.mini.TimeZoneImpl.c:(.text+0x496ca): undefined reference to
new_instance_with_classraw_index'CMakeFiles\ccjvm.dir/objects.a(com.sun.cldc.util.mini.TimeZoneImpl.c.obj):com.sun.cldc.util.mini.TimeZoneImpl.c:(.text+0x49744): undefined reference to
construct_string_with_utfraw_index' CMakeFiles\ccjvm.dir/objects.a(com.sun.cldc.util.mini.TimeZoneImpl.c.obj):com.sun.cldc.util.mini.TimeZoneImpl.c:(.text+0x49781): undefined reference to
new_instance_with_classraw_indexCMakeFiles\ccjvm.dir\build.make:11704: recipe for target 'ccjvm.exe' failedmingw32-make[2]: *** [ccjvm.exe] Interrupt
CMakeFiles\Makefile2:93: recipe for target 'CMakeFiles/ccjvm.dir/all' failed
mingw32-make[1]: *** [CMakeFiles/ccjvm.dir/all] Error 130
Makefile:101: recipe for target 'all' failed
mingw32-make: *** [all] Error 130`
Could you help me handle there problems. Thank you!
The text was updated successfully, but these errors were encountered: