[Mono-osx] Trying to compile PLP on Mono for MAC
dmostert
dmostert at gmail.com
Sun Jan 13 09:20:13 UTC 2013
Hi all,
I'm trying to compile PLP projects, but I'm running into a number of
problems:
This is my sample code from my PLP project:
using System;
using System.ComponentModel;
using System.Windows.Input;
namespace PortTest
{
public class MyClass: INotifyPropertyChanged
{
public MyClass ()
{ }
public event PropertyChangedEventHandler PropertyChanged;
public ICommand Command{get;set;}
}
public static class Extensions
{
public static void NaString (this string p)
{
p.ToString();
}
}
}
If I compile this code with Mono MDK 2.10.x, I get an error that ICommand is
not found.
If I compile this code with Mono MDK 3.0.3, I get an error that extension
methods are not available and that I should add a reference to
"System.Core". If I manually add
namespace System.Runtime.CompilerServices
{
public class ExtensionAttribute: Attribute
{
}
}
I can get the PLP to compile in 3.0.3
BUT
When I try to use this PLP in my MonoTouch test app, I run into more
problems:
Here is the sample code:
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using PortTest;
using System.Windows.Input;
namespace TouchMulti
{
public class Application
{
// This is the main entry point of the application.
static void Main (string[] args)
{
MyClass x = null;
ICommand x2 = null;
UIApplication.Main (args, null, "AppDelegate");
}
}
}
The 3.0.3 compiled version states that INotifyPropertyChanged is not
available and that I should add a reference to System v4.0.0.0 assembly.
The 2.10.x version seems to work.
Anything that I should do differently or are these bugs that I should log?
Thanks,
Dawid Mostert
--
View this message in context: http://mono.1490590.n4.nabble.com/Trying-to-compile-PLP-on-Mono-for-MAC-tp4658109.html
Sent from the Mono - OSX mailing list archive at Nabble.com.
More information about the Mono-osx
mailing list