Should I install a separate ming-gcc and try building in the cmd shell or is there something else likely to be wrong?   the -mno-cygwin option is recognized, but I get the same issue.   Here is the -v option which shows the final linking:<div>
<br></div><div><div>     [exec]  /usr/lib/gcc/i686-pc-mingw32/3.4.4/collect2.exe -Bdynamic -o rDotNet.dll /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/lib/crt2.o -Lc:/cygwin/home/jonathan.shore/Dev/hf/src/Libraries/CApi/lib/win32 -Lc:/cygwin/home/jonathan.shore/Dev/hf/src/Libraries/CApi/bin/Debug -Lc:/Program Files/R/R-2.14.0/bin/i386/ -L/usr/lib/gcc/i686-pc-mingw32/3.4.4 -L/usr/lib/gcc/i686-pc-mingw32/3.4.4 -L/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/lib -L/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../.. -L /usr/i686-pc-mingw32/sys-root/mingw/lib c:/cygwin/home/jonathan.shore/Dev/hf/src/Libraries/CApi/lib/win32/libmono-2.0.dll.a -lR -lmono-2.0 /tmp/ccILXCG3.o /tmp/ccJEF9fo.o /tmp/ccanTwx7.o /tmp/ccplAvT1.o /tmp/ccz8AVe8.o /tmp/ccfiDw2B.o /tmp/ccTcsUKn.o /tmp/cc9UqTZx.o /tmp/ccqfDboR.o /tmp/ccn1IMSt.o /tmp/ccWYgkXj.o -lstdc++ -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -lmingw32 -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt</div>
<div>     [exec] /tmp/ccfiDw2B.o:ToCLR.cpp:(.text+0x91): undefined reference to `_mono_string_new&#39;</div><div>     [exec] /tmp/ccfiDw2B.o:ToCLR.cpp:(.text+0x10e): undefined reference to `_mono_get_double_class&#39;</div>
<div>     [exec] /tmp/ccfiDw2B.o:ToCLR.cpp:(.text+0x130): undefined reference to `_mono_value_box&#39;</div><div>     [exec] /tmp/ccfiDw2B.o:ToCLR.cpp:(.text+0x1ca): undefined reference to `_mono_get_int32_class&#39;</div>
<div>     [exec] /tmp/ccfiDw2B.o:ToCLR.cpp:(.text+0x1ec): undefined reference to `_mono_value_box&#39;</div><div>     [exec] /tmp/ccfiDw2B.o:ToCLR.cpp:(.text+0x20c): undefined reference to `_mono_get_int32_class&#39;</div>
<div>     [exec] /tmp/ccfiDw2B.o:ToCLR.cpp:(.text+0x22e): undefined reference to `_mono_array_new&#39;</div><div>     [exec] /tmp/ccfiDw2B.o:ToCLR.cpp:(.text+0x25a): undefined reference to `_mono_array_addr_with_size&#39;</div>
<div>     [exec] /tmp/ccfiDw2B.o:ToCLR.cpp:(.text+0x2a0): undefined reference to `_mono_get_string_class&#39;</div><div>     ...</div><div><br></div><br><div class="gmail_quote">On Fri, Dec 16, 2011 at 3:30 PM, Robert Jordan <span dir="ltr">&lt;<a href="mailto:robertj@gmx.net">robertj@gmx.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Linking with libmono.a is not supported under Cygwin.<br>
Moreover, linking a cygwin app with <a href="http://libmono.la" target="_blank">libmono.la</a> (libmono.dll.a<br>
-&gt; mono.dll) would disable Mono&#39;s SIGSEGV handler. This means<br>
that NullReferenceExceptions would crash your app.<br>
<div class="im"><br>
&gt; A compilation like:<br>
&gt;<br>
&gt; g++ -o rDotNet.dll -I&lt;mono include dir&gt;  -L&lt;R libs&gt;  -L&lt;mono libs&gt;   *.cpp -lR<br>
&gt; -lmono-2.0<br>
<br>
</div>Try g++ -mno-cywin ...<br>
<br>
It should work if the R libs were compiled with -mno-cywin as well.<br>
<br>
Robert<br>
<br>
_______________________________________________<br>
Mono-devel-list mailing list<br>
<a href="mailto:Mono-devel-list@lists.ximian.com">Mono-devel-list@lists.ximian.com</a><br>
<a href="http://lists.ximian.com/mailman/listinfo/mono-devel-list" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-devel-list</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Jonathan Shore<br><a href="http://tr8dr.wordpress.com/">http://tr8dr.wordpress.com/</a><br>
</div>