Binding: What determines Libraries.g.cs? RRS feed

  • Question

  • User853 posted

    I am trying to bind the ChromeCast libraries and the first steps have gone pretty easily: Objective Sharpie, some amount of cleanup, etc.

    But just when I thought I was about to get a clean compile, I get:

     Error CS0117: `MonoTouch.Constants' does not contain a definition for `ChromeCastLibrary' (CS0117) (ChromeCastBinding)

    When I look at the code in Libraries.g.cs, I see:

    namespace MonoTouch {
    static class Libraries {
        static public class ChromeCast {
            static public readonly IntPtr Handle = Dlfcn.dlopen (Constants.ChromeCastLibrary, 0);

    Which makes me scratch my head. I don't even have the string or symbol "ChromeCastLibrary" in my project, as far as I know!

    What should I do to get rid of this message?

    Friday, August 2, 2013 12:28 AM

All replies

  • User13 posted

    Make sure that you specify the Library where it comes from on the [Field] and set that to "__Internal", this should work:

    [Field ("FooBar", "__Internal")] NSString FooBar { get; }

    Friday, August 2, 2013 1:39 AM
  • User853 posted

    That worked perfectly, thanks!

    Friday, August 2, 2013 2:06 AM