The paradigm of programming with Mono is slightly different than the C/C++ world. You can create libraries and have them linked to an executable. They will be come out as a .dll, but don't let that fool you - you can still run it on Linux. You can also drop that .dll on a Windows box and it will run without modification (for the most part). The reverse is true too. I can take a .dll library file compiled with .NET in the windows world and drop it on a Linux box and for the most part expect its going to work without modification.
It doesn't end there. I can take a C# assembly written and compiled via Mono on Linux, drop it on a Windows box and use it via IronPython or VB.Net. If it is a .Net language, you can simply reference it (same idea as linking), include the namespace and start using it. No COM+, no funky .defs or any of that craziness. When something is compiled via Mono/.Net it doesn't go to machine code. It is compiled to byte code.. something similar in nature to assembly. This byte code is compatible no matter what platform, or language was used - it becomes the same thing. JIT - or Just In Time compilation takes things the last mile. Yes, it is possible for managed code (.Net/Mono) to call un-managed (aka native) code. It is less common for the reverse to be done, but this is less common. Check out this search link for more information: http://www.google.com/search?q=unmanaged+code+call+managed http://www.google.com/search?q=unmanaged+code+call+managed Try not to let the initial difference scare you. Mono/.Net is quite powerful and useful once the concepts of how things are done are fully understood. You can review articles on the MSDN that talk about C#/ .net basics and a lot of what you read will apply to the Mono world. swap4575 wrote: > > Hi > > I am very new to Mono and have some doubts about it. Can Mono be used to > create an .so or .a library on Linux so that it can be used with C/C++ > code. I have tried many configurations in the IDE, but everytime would > end up getting an Windows DLL on Linux box. Is it possible to create such > library? If yes, can i use it directly like other shared objects or > archives? > > I tried searching for the same on forums, but couldnt find a thread which > will address my concerns. > > Regards > Swapneel > -- View this message in context: http://www.nabble.com/Help-to-understand-Mono-tp25002196p25099805.html Sent from the Mono - General mailing list archive at Nabble.com.
_______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
