[Mono-list] Re: [Mono-devel-list] Building embed sample or cilc generated code on Windows

Paolo Molaro lupus@ximian.com
Tue, 17 Jun 2003 19:35:09 +0200


On 06/12/03 Bob Stabler wrote:
> Now we have it compiling but it won't link, even though libmono.a is in
> the lib path:
> 
> bobst@BOBST2 /users/bobst/mono/mono/samples/embed
> $ make
> gcc -mno-cygwin -I/users/bobst/mono/mono
> -I/users/bobst/mono/install/include/gli
> b-2.0 -I/users/bobst/mono/install/lib/glib-2.0/include
> -Wl,--export-dynamic -L/
> users/bobst/mono/install/lib -lmono -lm -lgmodule-2.0 -lglib-2.0 -lintl
> -liconv
> -o teste teste.c
> /cygdrive/c/DOCUME~1/BOBST~1.AVS/LOCALS~1/Temp/ccGsByTX.o(.text+0x29):te
> ste.c: u
> ndefined reference to `mono_domain_get'

Can you check if any function is actually exported in libmono.dll
or libmono.a? Note, I assume there is a tool on windows that lets you
see the exported symbols, on unix we use nm -D library.so |grep ' T '.
It may be possible that we have to mark the functions that need
exporting from the library with the __declspec(dllexport) windows uses.
In that case, can you try adding that to mono_domain_get() and try again
to see if it stil reports that function missing?
You may also need to put test.c first in the command line, before the library
references.

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better