[swift-users] Ignore header file with module?

Harlan Haskins harlan at harlanhaskins.com
Fri Dec 4 17:49:20 CST 2015


+swift-users, again

Yes, the flash struct is necessary, and we can’t really rename it. 😕

> On Dec 4, 2015, at 6:27 PM, Daniel Dunbar <daniel_dunbar at apple.com> wrote:
> 
> I see now I misunderstood your question, I thought you just wanted to exclude a particular header that was in flipper that defined that struct, so that it wouldn't conflict.
> 
> Is the header that defines said struct in the flipper necessary for your client?
> 
> (FYI probably best to keep swift-users in the CC list if possible just so others can benefit from the info).
> 
>  - Daniel
> 
> 
>> On Dec 4, 2015, at 3:16 PM, Harlan Haskins <harlan at harlanhaskins.com <mailto:harlan at harlanhaskins.com>> wrote:
>> 
>> Ah! I somehow missed that keyword in the docs.
>> 
>> However, it seems the path is /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/curses.h
>> 
>> If I intend this to be cross-platform, how can I exclude that file in a non-Mac specific way?
>> 
>> Also it doesn’t seem to be excluding anything — I still get the issue.
>> 
>> My file is currently
>> 
>> module CFlipper [system] {
>>     exclude header "/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/curses.h"
>>     exclude header "/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/search.h"
>>     umbrella "/Users/harlan/.flipper/include/"
>>     link "flipper"
>>     export *
>> }
>> 
>> 
>>> On Dec 4, 2015, at 6:08 PM, Daniel Dunbar <daniel_dunbar at apple.com <mailto:daniel_dunbar at apple.com>> wrote:
>>> 
>>> Try using:
>>>   exclude header "/path/to/header.h"
>>> in the module definition.
>>> 
>>>  - Daniel
>>> 
>>>> On Dec 4, 2015, at 3:06 PM, Harlan Haskins <harlan at harlanhaskins.com <mailto:harlan at harlanhaskins.com>> wrote:
>>>> 
>>>> Hi all,
>>>> 
>>>> Is there a way to ignore a specific header file when declaring a C dependency? I’m working with a library that publicly declares `flash` as a struct, and that conflicts with `ncurses`’s definition of `flash`. His code makes no use of curses.h, and I won’t be using it either.
>>>> 
>>>> Is there any way I can specifically exclude `curses.h` from my modulemap file? It’s a very simple file.
>>>> 
>>>> module CFlipper [system] {
>>>>     umbrella "/usr/local/include/flipper/"
>>>>     link "flipper"
>>>>     export *
>>>> }
>>>> 
>>>> _______________________________________________
>>>> swift-users mailing list
>>>> swift-users at swift.org <mailto:swift-users at swift.org>
>>>> https://lists.swift.org/mailman/listinfo/swift-users <https://lists.swift.org/mailman/listinfo/swift-users>
>>> 
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20151204/6b5a5e0f/attachment.html>


More information about the swift-users mailing list