Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel
bgColor#F7D6C1
borderStyledashed
Wiki Markup

{color:green}{*}gmcs{*}{color} \-target:library \-out:<target>.dll {color:red}\-r<linkedLib_1>.dll,<linkedLib_k>.dll{color} {color:blue}\-pkg:<package_1>.pc
;...;
,<package_m>.pc{color} <source_1>.cs <source_n>.cs


{color:red}\-r:<linkedLib_?>.dll{color} : reference to linked shared libraries (path and name)


{color:blue}\-pkg:<package_?>.pc{color} : ASCII files (path and name), that refer to linked shared libraries <linkedlib_?>.dll. They contain the path and the version of the dll. Example for the Windows.Forms:


prefix=/usr/lib/mono/2.0


exec_prefix=${prefix}


libdir=${exec_prefix}


Name: WindowsForms


Description: Windows Forms


Version: 2.0


Libs: \-r:${libdir}/System.Windows.Forms.dll

Command for generating an exe file:

Panel
bgColor#F7D6C1
borderStyledashed

gmcs -out:<target>.exe -r<linkedLib_1>.dll,<linkedLib_k>.dll -pkg:<package_1>.pc,<package_m>.pc <source_1>.cs <source_n>.cs

...

The GUI sources use Windows.Forms, that works with resource files in order to design the graphical elements. The Windows resource files (*.resx) are generated automatically in the Microsoft Visual Studio IDE. Linux applications do not process them and create a "resource not found" exception during runtime. Thus, the resources have to be converted with the Mono tool resgen / resgen2. The following command generates a Linux readable resource <name>.resource:
resgen <name>.resx generates a Linux readable resource <name>.resource .
Visual Studio assigns automatically a resource file to a C# file automatically. On a Linux machine naming conventions guarantee the correct assignment. The C# source and its resource file must have the same prefix. This first part of the prefix must be the namespace.

...

Mono Forums are very helpful: http://www.go-mono.com/forums/
Error messages are partly often the same as in Microsoft Windows .NET. You can look them up on the MSDN homepage.

...