[Mono-dev] Embedding C

Zoltan Varga vargaz at gmail.com
Tue Mar 21 17:24:11 EST 2006


                             Hi,

  Check the output of pkg-config --cflags --libs mono, to see where
libmono should be, then
check why it isn't there, or why gcc can't find it.

                     Zoltan

On 3/21/06, Rusmin Susanto <rusminsusanto at yahoo.com> wrote:
>
> 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. Th en, 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 poin t 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.
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
>



More information about the Mono-devel-list mailing list