Questions tagged [gmcs]

gmcs is the C# compiler used by mono.

gmcs is the C# compiler used by mono. It has supplanted the older mcs which does not support generics.

A full explanation of the relationship between mcs, gmcs, and other Mono CSharp compilers is at the Mono Project website.

28 questions
42
votes
4 answers

How can you use Mono's mcs to compile and run a csproj file?

I'm a Unix guy who needs to try and compile some C# code for work. I've downloaded Mono for Mac, and the mcs command line tool. There's a csproj file attached to this library which contains XML with all of the files I need to compile. Can Mono/mcs…
Kevin Burke
  • 61,194
  • 76
  • 188
  • 305
15
votes
2 answers

Extending the Mono C# compiler: is there any documentation or precedent?

I am currently involved in some interesting programming language research which has, up until now, centred around extending the upcoming Java 7.0 compiler with some very powerful programmer-productivity-based features. The work should be equally…
Richard Cook
  • 32,523
  • 5
  • 46
  • 71
10
votes
2 answers

MonoDevelop: is it possible to switch PCL's compiler?

We are starting a cross-platform project to be deployed to Android and iOS. Obviously, a lot of code is to be shared between the two, and some of the code relies heavily on the .NET framework items, like sqlite-net library does. The best way (afaik)…
Anton
  • 2,483
  • 2
  • 23
  • 35
8
votes
2 answers

Mono Compiler as a Service (MCS)

I'd like to consume Mono's compiler as a service from my regular .NET 3.5 application. I've downloaded the latest bits (2.6.7), created a simple console application in Visual Studio and referenced the Mono.CSharp dll. Then, in my console app…
Jeff
  • 35,755
  • 15
  • 108
  • 220
8
votes
1 answer

Run mono .exe with the DLL's in a different folder

I compiled the test.cs file (which references a third party library) using the dmcs executable for Mac and the following command line program: dmcs /out:program.exe test.cs /target:exe /reference:/Users/kevin/path/to/bin/Debug/project.dll This…
Kevin Burke
  • 61,194
  • 76
  • 188
  • 305
7
votes
2 answers

Can the Mono compiler as a service be used in a debugging context?

I'd like to know if and how I might be able to use the Mono compiler as a service (see here and here ) within a debugging context to query/modify/visualize/etc objects at runtime within the debugger. At the moment, per this SO post the Roslyn CTP…
lightw8
  • 3,262
  • 2
  • 25
  • 35
4
votes
1 answer

Why can't I pass just the name of a method where a similarly typed Func is expected?

Why doesn't this C# typecheck? In this example, I am trying to pass a method of type string -> string as a Func. It would be seem perfectly reasonable to be able to omit lambda syntax when passing just the name of an appropriately…
David Siegel
  • 1,604
  • 11
  • 13
4
votes
1 answer

webkit-sharp for windows package

I wanted to try WebKit by following this tutorial, but gmcs compiler was't able to find "webkit-sharp-1.0" package. Where can i get it and how to install it?
3
votes
1 answer

gmcs error generating dll

I have a C# file that I want to turn into a dll. Test1.cs contains the following code: using System; namespace ProgramLibrary { public class Lib { public Lib() { Console.WriteLine("Lib Created"); } …
Phlox Midas
  • 4,093
  • 4
  • 35
  • 56
3
votes
3 answers

Compile & Install Mono on Centos - Can't get past 'make'

The basic instructions for installing Mono are: tar xzvf mono-X.XX.tar.gz; cd mono-X.XX ./configure --prefix=/usr/local; make; make install So I've downloaded the latest version from http://download.mono-project.com/sources/mono/ and extracted it…
James R
  • 651
  • 1
  • 12
  • 21
2
votes
1 answer

compile cs files with mono?

I am trying to compile my project with mono on linux. My cmd looks something like... gmcs Pages/UserProfile.cs Properties/AssemblyInfo.cs queues.cs watch_editor.cs Class1.cs -define:USE_SQLITE -r:System -r:System.Collections…
user34537
1
vote
2 answers

How to include libraries (such as fastJSON) in a c# (gmcs) project

Disclaimer: I just made by hello world with gmcs yesterday Problem I want to use fastJSON in my project using gmcs. How do I compile the project, consisting of 10 or so files into a library? statically link against that library with my 1-file…
coolaj86
  • 74,004
  • 20
  • 105
  • 125
1
vote
2 answers

Defining Custom Library Version in Mono

Does anyone how to set a custom library version, when compiling with the gmcs command? Basically, when I would run "monop -r mydll.dll" it should say Version=MyVersion(e.g.: 1.0.1.0). Any help is welcome, Thanks in advance! Henrique
htaunay
  • 73
  • 1
  • 2
  • 9
1
vote
0 answers

How to compile C# class library project with mono (linux)?

Using C# compiler, in Windows I can successfully create a .dll file from a C# project, using the following commands: cd /path/to/my/directory/with/.csproj/file csc /target:library /out:NameOfNewDll.dll /recurse:*.cs But, I need to do the same with…
delux
  • 1,694
  • 10
  • 33
  • 64
1
vote
2 answers

Include file in C#, Mono (gmcs)

I'm writing a really small application in C# and I need to include an .cs file with some class. How do I do that? I'm looking for some equivalent to PHP's "include file" or Python's "from file import something". Obviously "using" is not enough and…
tobik
  • 7,098
  • 7
  • 41
  • 53
1
2