[Mono-list] Embed example dose not compile :(

Auge Mike tobe_better@hotmail.com
Wed, 23 Oct 2002 23:37:49 +0400


Hi all,


Here is what happened to me.... (I have Win2000 + Cygwin + .Net Framework)

*********
1. The first try....

$ gcc -o teste teste.c `pkg-config --cflags --libs mono` -lm
gnome-config: not found
Package mono was not found in the pkg-config search path.
Perhaps you should add the directory containing `mono.pc'
to the PKG_CONFIG_PATH environment variable
No package 'mono' found
teste.c:1: mono/jit/jit.h: No such file or directory

********
2. Exporting the PKG_CONFIG_PATH...

PKG_CONFIG_PATH=/usr/local/bin/mono/install/lib/pkgconfig
export PKG_CONFIG_PATH

*******
3. A seond try.....

$ gcc -o teste teste.c `pkg-config --cflags --libs mono` -lm
In file included from 
D:/old_e/cygwin/usr/local/bin/mono/install/include/mono/ji
t/jit.h:15,
                 from teste.c:1:
D:/old_e/cygwin/usr/local/bin/mono/install/include/mono/io-layer/io-layer.h:24:
mono/io-layer/wapi.h: No such file or directory
D:/old_e/cygwin/usr/local/bin/mono/install/include/mono/io-layer/io-layer.h:25:
mono/io-layer/uglify.h: No such file or directory
In file included from 
D:/old_e/cygwin/usr/local/bin/mono/install/include/mono/me
tadata/loader.h:4,
                 from 
D:/old_e/cygwin/usr/local/bin/mono/install/include/mono/ji
t/jit.h:24,
                 from teste.c:1:
D:/old_e/cygwin/usr/local/bin/mono/install/include/mono/metadata/metadata.h:5: 
g
lib.h: No such file or directory
In file included from 
D:/old_e/cygwin/usr/local/bin/mono/install/include/mono/me
tadata/metadata.h:9,
                 from 
D:/old_e/cygwin/usr/local/bin/mono/install/include/mono/me
tadata/loader.h:4,
                 from 
D:/old_e/cygwin/usr/local/bin/mono/install/include/mono/ji
t/jit.h:24,
                 from teste.c:1:
D:/old_e/cygwin/usr/local/bin/mono/install/include/mono/metadata/image.h:5: 
glib
.h: No such file or directory
In file included from 
D:/old_e/cygwin/usr/local/bin/mono/install/include/mono/me
tadata/reflection.h:8,
                 from 
D:/old_e/cygwin/usr/local/bin/mono/install/include/mono/ji
t/jit.h:28,
                 from teste.c:1:
D:/old_e/cygwin/usr/local/bin/mono/install/include/mono/utils/mono-hash.h:36: 
gl
ib.h: No such file or directory
In file included from 
D:/old_e/cygwin/usr/local/bin/mono/install/include/mono/ji
t/jit.h:29,
                 from teste.c:1:
D:/old_e/cygwin/usr/local/bin/mono/install/include/mono/metadata/appdomain.h:13:
glib.h: No such file or directory
In file included from 
D:/old_e/cygwin/usr/local/bin/mono/install/include/mono/ji
t/jit.h:30,
                 from teste.c:1:
D:/old_e/cygwin/usr/local/bin/mono/install/include/mono/metadata/opcodes.h:13: 
g
lib.h: No such file or directory
In file included from 
D:/old_e/cygwin/usr/local/bin/mono/install/include/mono/ji
t/jit.h:31,
                 from teste.c:1:
D:/old_e/cygwin/usr/local/bin/mono/install/include/mono/utils/monobitset.h:4: 
gl
ib.h: No such file or directory
In file included from 
D:/old_e/cygwin/usr/local/bin/mono/install/include/mono/ji
t/jit.h:33,
                 from teste.c:1:
D:/old_e/cygwin/usr/local/bin/mono/install/include/mono/jit/regset.h:11: 
glib.h:
No such file or directory


********

4. I copied the contents of glib-2.0, to its parent directory......and tried 
to compile...

$ gcc -o teste teste.c `pkg-config --cflags --libs mono` -lm
In file included from 
D:/old_e/cygwin/usr/local/bin/mono/install/include/mono/ji
t/jit.h:15,
                 from teste.c:1:
D:/old_e/cygwin/usr/local/bin/mono/install/include/mono/io-layer/io-layer.h:24:
mono/io-layer/wapi.h: No such file or directory
D:/old_e/cygwin/usr/local/bin/mono/install/include/mono/io-layer/io-layer.h:25:
mono/io-layer/uglify.h: No such file or directory

********

5.I collect all the *.h file from the mono directory, i got a large errors, 
this is the last part of it....

D:/old_e/cygwin/usr/local/bin/mono/install/lib/libmono.a(process.lo): In 
functio
n `ves_icall_System_Diagnostics_Process_GetProcesses_internal':
/usr/local/bin/mono/mono/mono/metadata/process.c:796: undefined reference to 
`En
umProcesses@12'
D:/old_e/cygwin/usr/local/bin/mono/install/lib/libmono.a(sysmath.lo): In 
functio
n `ves_icall_System_Math_Log':
/usr/local/bin/mono/mono/mono/metadata/sysmath.c:107: undefined reference to 
`_i
mp___HUGE'
D:/old_e/cygwin/usr/local/bin/mono/install/lib/libmono.a(sysmath.lo): In 
functio
n `ves_icall_System_Math_Log10':
/usr/local/bin/mono/mono/mono/metadata/sysmath.c:118: undefined reference to 
`_i
mp___HUGE'
D:/old_e/cygwin/usr/local/bin/mono/install/lib/libmono.a(strtod.lo): In 
function
`bsd_strtod':
/usr/local/bin/mono/mono/mono/utils/strtod.c:1390: undefined reference to 
`_errn
o'
/usr/local/bin/mono/mono/mono/utils/strtod.c:1392: undefined reference to 
`_imp_
__HUGE'
/usr/local/bin/mono/mono/mono/utils/strtod.c:1443: undefined reference to 
`_errn
o'
collect2: ld returned 1 exit status

I don't know what to do...
Any suggestion, please help me.......

Yours,


_________________________________________________________________
Choose an Internet access plan right for you -- try MSN! 
http://resourcecenter.msn.com/access/plans/default.asp