Bug 51233 - Sharpie cannot find .h file
Summary: Sharpie cannot find .h file
Status: NEW
Alias: None
Product: Objective Sharpie
Classification: Desktop
Component: General ()
Version: master
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Aaron Bockover [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2017-01-05 10:31 UTC by José Fabio Martinez Gonzalez
Modified: 2017-01-05 10:38 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 51233 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description José Fabio Martinez Gonzalez 2017-01-05 10:31:35 UTC
I am using sharpie 3.3.0p 3d8547f 3d8547fcf1f7c2c2337b122c8d1fe893eb6a1ad3 2016-08-03 04:49:53

When I try to bind the header files, sharpie is telling me that there is an error because it cannot find a header file that was imported with `#import <MQTTClient/MQTTSession.h>`.

A workaround is to change `#import <MQTTClient/MQTTSession.h>` to `#import "MQTTSession.h"` where sharpie can then find the needed header file. However, I need to do this manually. I might have missed a sharpie command but could not find anything about it.

Here is my sharpie command and its output:

$ cat bind.sh
sharpie bind -sdk iphoneos10.2 \
  -namespace MyCompany.IoT.Mqtt.iOS \
  build/Release-universal/MQTTClient/MQTTClient.framework/Headers/MQTTClient-umbrella.h \
  -scope build/Release-universal/MQTTClient/MQTTClient.framework/Headers \
  -c -F .

$ ./bind.sh 
Parsing 1 header files...
In file included from /Users/jose.martinez/Documents/Workspaces/MyCompany.IoT.Mqtt.iOS/src/MyCompany.IoT.Mqtt.iOS/build/Release-universal/MQTTClient/MQTTClient.framework/Headers/MQTTClient-umbrella.h:21:
/Users/jose.martinez/Documents/Workspaces/MyCompany.IoT.Mqtt.iOS/src/MyCompany.IoT.Mqtt.iOS/build/Release-universal/MQTTClient/MQTTClient.framework/Headers/MQTTClient.h:18:9: fatal error: 
      'MQTTClient/MQTTSession.h' file not found
#import <MQTTClient/MQTTSession.h>
        ^

Binding...
  [write] ApiDefinitions.cs
  [write] StructsAndEnums.cs

Binding Analysis:
  Automated binding is complete, but there are a few APIs which have been flagged with [Verify] attributes. While the entire binding should be audited
  for best API design practices, look more closely at APIs with the following Verify attribute hints:

  MethodToProperty (3 instances):
    An Objective-C method was bound as a C# property due to convention such as taking no parameters and returning a value (non-void return). Often
    methods like these should be bound as properties to surface a nicer API, but sometimes false-positives can occur and the binding should actually be
    a method.

  StronglyTypedNSArray (9 instances):
    A native NSArray* was bound as NSObject[]. It might be possible to more strongly type the array in the binding based on expectations set through
    API documentation (e.g. comments in the header file) or by examining the array contents through testing. For example, an NSArray* containing only
    NSNumber* instances can be bound as NSNumber[] instead of NSObject[].

  ConstantsInterfaceAssociation (2 instances):
    There's no foolproof way to determine with which Objective-C interface an extern variable declaration may be associated. Instances of these are
    bound as [Field] properties in a partial interface into a nearby concrete interface to produce a more intuitive API, possibly eliminating the '
    Constants' interface altogether.

  Once you have verified a Verify attribute, you should remove it from the binding source code. The presence of Verify attributes intentionally cause
  build failures.
  
  For more information about the Verify attribute hints above, consult the Objective Sharpie documentation by running 'sharpie docs' or visiting the
  following URL:

    http://xmn.io/sharpie-docs
1 error generated.
Error while processing /Users/jose.martinez/Documents/Workspaces/MyCompany.IoT.Mqtt.iOS/src/MyCompany.IoT.Mqtt.iOS/build/Release-universal/MQTTClient/MQTTClient.framework/Headers/MQTTClient-umbrella.h.

Submitting usage data to Xamarin...
  Submitted - thank you for helping to improve Objective Sharpie!

Done. Exiting with error code 1.
error: Clang failed to parse input and exited with code 1