[Mono-dev] Embedding C
Rusmin Susanto
rusminsusanto at yahoo.com
Tue Mar 21 17:01:53 EST 2006
Hi all. I have some questions.
1. I tried to build and execute the examples in the embed folder. The instruction in file test.c is as follows:
/*
* Very simple mono embedding example.
* Compile with:
* gcc -o teste teste.c `pkg-config --cflags --libs mono` -lm
* mcs test.cs
* Run with:
* ./teste test.exe
*/
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
Then I tried to find libmono.so.0 file. I copied that libmono.so.0 file to the embed folder (folder where teste and test.exe reside).
But I still got the same error message. Then, I run "teste test.exe" from the original folder where libmono.so.0 resides. It still didn't work.
Can anyone tell me what's wrong? What should I do to get it works?
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
For information, I am running Mono 1.1.13.2 under x86 platform. I know that for some functions (eg. in System.Math) the calls to C code are replaced by direct floating point instructions. I am not interested in this. I want examples in the real Mono runtime that are executed in similar way to the examples in the embed folder.
Many thanks for your attention.
Rusmin
---------------------------------
Yahoo! Mail
Use Photomail to share photos without annoying attachments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060321/c2326e4d/attachment.html
More information about the Mono-devel-list
mailing list