[Mono-devel-list] mono runtime type and function definitions

Urs C Muff umuff at quark.com
Mon Feb 23 16:41:54 EST 2004


On Feb 21, 2004, at 9:41 AM, Paolo Molaro wrote:

> On 02/20/04 Urs Muff wrote:
>> Call me crazy, but I would love to see mono header type and function
>> definitions to use C++ namespaces, optionally.  I know that mono is  
>> compiled
>> in C and not C++ right now.
>>
>> The reason for asking for this is simple, I'm trying to include the  
>> mono
>> runtime into another project and have to include conflicting  
>> definitions.
>> (The specific case we are talking about is the Foundation Framework of
>> Apple's Cocoa, and therefore I cannot modify those headers).
>
> Can you detail what are the conflicts? There could be some namespace
> pollution in the mono headers which we might need to cleanup. Or
> the issues could be worked around by including in a file either mono or
> the Cocoa stuff, if possible.

In file included from /usr/local/include/mono/io-layer/wapi.h:24,
                  from /usr/local/include/mono/io-layer/io-layer.h:24,
                  from /usr/local/include/mono/metadata/loader.h:6,
                  from /usr/local/include/mono/metadata/class.h:6,
                  from /usr/local/include/mono/metadata/object.h:4,
                  from /usr/local/include/mono/metadata/appdomain.h:15,
                  from /usr/local/include/mono/jit/jit.h:11,
                  from  
/Users/umuff/Mono-Interop/1st-Mono-Cocoa/MonoClass.h:11,
                  from  
/Users/umuff/Mono-Interop/1st-Mono-Cocoa/MonoAssembly.h:10,
                  from  
/Users/umuff/Mono-Interop/1st-Mono-Cocoa/MyController.m:3:
/usr/local/include/mono/io-layer/processes.h:111: error: conflicting  
types for `GetCurrentProcess'
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ 
HIServices.framework/Headers/Processes.h:344: error: previous  
declaration of `GetCurrentProcess'

In file included from /usr/local/include/mono/io-layer/wapi.h:29,
                  from /usr/local/include/mono/io-layer/io-layer.h:24,
                  from /usr/local/include/mono/metadata/loader.h:6,
                  from /usr/local/include/mono/metadata/class.h:6,
                  from /usr/local/include/mono/metadata/object.h:4,
                  from /usr/local/include/mono/metadata/appdomain.h:15,
                  from /usr/local/include/mono/jit/jit.h:11,
                  from  
/Users/umuff/Mono-Interop/1st-Mono-Cocoa/MonoClass.h:11,
                  from  
/Users/umuff/Mono-Interop/1st-Mono-Cocoa/MonoAssembly.h:10,
                  from  
/Users/umuff/Mono-Interop/1st-Mono-Cocoa/MyController.m:3:
/usr/local/include/mono/io-layer/threads.h:47: error: conflicting types  
for `GetCurrentThread'
/System/Library/Frameworks/CoreServices.framework/Frameworks/ 
CarbonCore.framework/Headers/Threads.h:583: error: previous declaration  
of `GetCurrentThread'

In file included from /usr/local/include/mono/io-layer/io-layer.h:25,
                  from /usr/local/include/mono/metadata/loader.h:6,
                  from /usr/local/include/mono/metadata/class.h:6,
                  from /usr/local/include/mono/metadata/object.h:4,
                  from /usr/local/include/mono/metadata/appdomain.h:15,
                  from /usr/local/include/mono/jit/jit.h:11,
                  from  
/Users/umuff/Mono-Interop/1st-Mono-Cocoa/MonoClass.h:11,
                  from  
/Users/umuff/Mono-Interop/1st-Mono-Cocoa/MonoAssembly.h:10,
                  from  
/Users/umuff/Mono-Interop/1st-Mono-Cocoa/MyController.m:3:
/usr/local/include/mono/io-layer/uglify.h:27: error: conflicting types  
for `BOOL'
/usr/include/objc/objc.h:42: error: previous declaration of `BOOL'
In file included from  
/Users/umuff/Mono-Interop/1st-Mono-Cocoa/MonoAssembly.h:10,
                  from  
/Users/umuff/Mono-Interop/1st-Mono-Cocoa/MyController.m:3:


>
>> I don't know how feasible it would be to switch to C++, the name  
>> mangling
>> will be different, I'm not implying to use other C++ features.
>
> Compiling mono with a C++ compiler is not an option, though the header
> files are supposed to be used from C++ and obj-C just fine (or we have  
> a
> bug and we need to fix it). I plan to take a few weeks before the
> mono 1.0 release to cleanup and provide a better and more supportable  
> mono
> embedding interface, so let me know of any issues.

I'm working on an Objective-C interop 'Apple Framework' and I will post  
something here, when I have something to show.  The principal tests are  
working, but I have to complete some simple reflection stuff...

>
> Thanks.
>
> lupus
>
> -- 
> -----------------------------------------------------------------
> lupus at debian.org                                     debian/rules
> lupus at ximian.com                             Monkeys do it better
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 5191 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040223/c3024a5d/attachment.bin 


More information about the Mono-devel-list mailing list