boost crowd.

Max Samukha maxter at spambox.com
Mon Nov 28 05:34:19 PST 2011


On 11/28/2011 02:29 PM, so wrote:
> On Mon, 28 Nov 2011 13:58:25 +0200, Max Samukha <maxter at spambox.com> wrote:
>
>>> How would you write libraries?
>>
>> The way they do, for example, in C# - interface definitions are stored
>> in the library, no need for separate headers.
>
> Are we talking about the same thing?
> Something like
> http://msdn.microsoft.com/en-us/library/ms236403(v=vs.80).aspx?
>
> So it does what auto-generated .di files does, and turns it into an
> abomination, it relies on an IDE feature?

No, it has nothing to do with the IDE. The article describes a visual 
tool for viewing meta-data stored in a .NET binary. You don't have to 
use it.

Specially for you, die-hard IDE haters, this is how to use the terminal 
to create a mono app and library:

1. Library:

nano lib.cs
----
using System;

public class Lib
{
     public static void hello() { Console.WriteLine("We don't need no 
header crap"); }
}
----

Compile that into a library, lib.dll:

dmcs lib.cs -target:library

2. Host:

nano app.cs
----
class App
{
     public static void Main()
     {
         Lib.hello();
     }
}

Compile and run the app:

dmcs app.cs -reference:lib.dll
./app.exe
We don't need no header crap

.

> Amazing, so now "programmer" means VisualStudio user? Probably this is
> why everyone using only C/C++ for serious library development.
>

Your information about "serious" programming is a bit outdated.

> (Please don't take it personal, this is my usual tone)

No problem.



More information about the Digitalmars-d mailing list