[Mono-dev] Building mono runtime in VS2003

Jonathan Chambers joncham at gmail.com
Wed Dec 12 16:24:58 EST 2007


Hello Brock,
    This is untested (I no longer have 2003 installed), but I think you can
do something like (modified from here
http://msdn2.microsoft.com/en-us/library/bb310595.aspx). If the below
doesn't work, you can probably google for some inline assembly to implement
the functionality needed. :

#if _MSC_VER < 1400
    // With VC++ 2003 you need to declare _ReadWriteBarrier
    extern "C" void _ReadWriteBarrier();
    extern "C" void *_ReadBarrier*();
    extern "C" void *_WriteBarrier*();
#else
    // With VC++ 2005 you can get the declaration from intrin.h
    #include <intrin.h>
#endif



Thanks,
Jonathan

On Dec 12, 2007 4:11 PM, Brock Reeve <Brock.Reeve at ni.com> wrote:

>
> Hi everyone,
>
> I am building eglib, libgc, and mono in VS2003. I previously have build
> them in VS2005 with no issues but now need to build in VS2003 to target
> Pharlap real time OS. I have worked through most issues (eglib and libgc are
> building) but one has got me. In mono-membar.h (libmono) it is looking for
> intrin.h which does not ship with VS2003. I am not sure how to translate
> the code. Any suggestions would be appreciated. Here is the segment in
> mono-membar.h
>
> #include <intrin.h>
>
>         static inline void mono_memory_barrier (void)
>         {
>                 _ReadWriteBarrier ();
>         }
>
>         static inline void mono_memory_read_barrier (void)
>         {
>                 _ReadBarrier ();
>         }
>
>         static inline void mono_memory_write_barrier (void)
>         {
>                 _WriteBarrier ();
>         }
>
>
> Thanks,
>
> Brock
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20071212/7d684940/attachment.html 


More information about the Mono-devel-list mailing list