[Mono-dev] Embedding C
Rusmin Susanto
rusminsusanto at yahoo.com
Wed Mar 22 17:21:21 EST 2006
Thank you everyone for the answers. It worked after I set LD_LIBRARY_PATH to the correct location. By the way, where can I get the list of all environmet variables that must be set to get Mono works 100%?
I also had a look at System.String (both String.cs and string-icalls.c). One function that I think makes an internal call is this:
private extern String InternalReplace (char oldChar, char newChar);
I looked at string-icalls.c and believed that function
MonoString * ves_icall_System_String_InternalReplace_Char (MonoString *me, gunichar2 oldChar, gunichar2 newChar)
implements the System.String.InternalReplace function.
To prove this, then I added the following line inside the ves_icall_System_String_InternalReplace_Char function:
printf("Internal call ReplaceChar is executed\n");
Then, I rebuilt my Mono and install it (all libraries are in the correct place and up to date).
The problem is when I execute the System.String.InternalReplace from a simple C# program, I still didn't see the
"Internal call ReplaceChar is executed"
message printed on the screen. Can you tell me what's wrong?
Rusmin
Paolo Molaro <lupus at ximian.com> wrote:
On 03/21/06 Rusmin Susanto wrote:
> I followed the instruction above. But I always get this error:
>
> ./teste: error while loading shared libraries: libmono.so.0: cannot open shared object file: No such file or directory
This means you didn't install mono correctly (typically you didn't set
LD_LIBRARY_PATH or the /etc/ld.so.conf file to include the directory where
libmono is installed).
> 2. Is there any standard library in mono that is implemented in C and
> executed via internal calls? Basically, I want to know real examples
> (in the real Mono runtime implementation) that are executed in similar
> way to the examples in the embed folder.
>
> I see a lot of the following code
>
> [MethodImplAttribute (MethodImplOptions.InternalCall)]
>
> inside the mcs sub-folders. So, I presume there must be some functions
> in the standard library that are implemented in C
The mapping between the C# internal call anmes and the C function names
is done in mono/metadata/icall.c: there are several examples of methods
there.
docs/internal-calls should be read as well if you're interested in
internal calls.
lupus
--
-----------------------------------------------------------------
lupus at debian.org debian/rules
lupus at ximian.com Monkeys do it better
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
---------------------------------
Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060322/cfcb942b/attachment.html
More information about the Mono-devel-list
mailing list