.a linking (with Mono)
BlitzMax Forums/BlitzMax Programming/.a linking (with Mono)
| ||
On windows you can import the mono library like so: (notice 'libmono.dll.a')Import "C:\libraries\Mono\lib\libmono.dll.a" Extern Function Mono_Config_Parse(file$z) = "mono_config_parse" '= getprocaddress(handle,"mono_config_parse") Function mono_jit_init:Byte Ptr(file$z) = "mono_jit_init" Function mono_jit_cleanup(domain:Byte Ptr) = "mono_jit_cleanup" Function mono_runtime_exec_main(domain:Byte Ptr) = "mono_runtime_exec_main" Function mono_set_dirs(asmdir$z, cfgdir$z) = "mono_set_dirs" Function mono_domain_assembly_open:Byte Ptr(domain:Byte Ptr, file$z) = "mono_domain_assembly_open" Function mono_jit_exec(domain:Byte Ptr, assembly:Byte Ptr, argv:Int, argc$z) = "mono_jit_exec" Function mono_assembly_get_image:Byte Ptr(assembly:Byte Ptr) = "mono_assembly_get_image" Function mono_class_from_name:Byte Ptr(image:Byte Ptr, namespace$z, name$z) = "mono_class_from_name" Function mono_class_get_method_from_name:Byte Ptr(klass:Byte Ptr, name$z, param_count:Int) Function mono_runtime_invoke(Meth:Byte Ptr, Obj:Byte Ptr, params:Byte Ptr, exc:Byte Ptr) Function mono_object_new:Byte Ptr(domain:Byte Ptr, class:Byte Ptr) = "mono_object_new" Function mono_runtime_object_init(obj:Byte Ptr) = "mono_runtime_object_init" End Extern However, in Linux there is only libmono.a (no libmono.so.a or anything). When trying to link to the libmono.a library I get about a 578kb worth of errors (mostly function definition errors). Here is a section of the error list: |
| ||
TryImport "-lmono" under Linux. That might work under Windows as well for the dynamic library, but I'm not sure. |
| ||
under Linux. That might work under Windows as well for the dynamic library, but I'm not sure. Heh. I just recently found Brucey doing that in FMOD (along with the LD_OPTS ModuleInfo thing).It works with windows, but I haven't got on Linux yet to test it.. |