DLL compilation

I’m trying to create a dll from my code as described in the Unity Documentation.
So, for this I’m doing:

mcs -target:library FolderA/ClassA.cs 

And I get this error:

The type or namespace name `ClassB' could not be found.
The type or namespace name `ClassC' could not be found.
The type or namespace name `ClassD' could not be found.
The type or namespace name `ClassE' could not be found.
...

If I manually include the sources ir works fine.

mcs -target:library FolderA/ClassA.cs FolderA/ClassB.cs  FolderA/ClassC.cs  ...

But not when I try to include the whole folder.

mcs -target:library -lib:FolderA FolderA/ClassA.cs

What am I doing wrong?

You may want to use gmcs.exe instead, mcs.exe references 1.1 assemblies, gmcs.exe references 2.0 by default.

Other then that, you need to specify the files as you did manually and as you are aware, things will go great. As far as i know you CAN NOT use wild cards or just directory reads to include your classes.

On a side note, why not just manage all this through monodevelop/visual studio?

EDIT:
try using gmcs.exe like:
gmcs -target:library FolderA/*.cs