<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Is there a way I can tell this not to compile with the OS X SDK? The C library is responsible for including all the headers it needs.<br></div><div><br>On Dec 4, 2015, at 7:15 PM, Harlan Haskins <<a href="mailto:harlan@harlanhaskins.com">harlan@harlanhaskins.com</a>> wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div class="">So what happens is flipper.h declares a struct called `flash`. When I use `swift build` to build that module, I get this error:</div><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" class="">/Users/harlan/.flipper/include/flash/flash.h:29:3: error: redefinition of 'flash' as different kind of symbol</font></div><div class=""><font face="Menlo" class="">} flash;</font></div><div class=""><font face="Menlo" class=""> ^</font></div><div class=""><font face="Menlo" class="">/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/ncurses.h:566:28: note: previous definition is here</font></div><div class=""><font face="Menlo" class="">extern NCURSES_EXPORT(int) flash (void); /* implemented */</font></div></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class="">Even though I have no need for `curses.h` at all.</div><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 4, 2015, at 6:55 PM, Daniel Dunbar <<a href="mailto:daniel_dunbar@apple.com" class="">daniel_dunbar@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">(+Jordan, who may have some good ideas)</div><div class=""><br class=""></div>This is going to be problematic, I am not sure yet how to deal with this.<div class=""><br class=""></div><div class="">Can you explain more about exactly how this ends up failing? Do you have code which imports both Darwin and flipper?</div><div class=""><br class=""></div><div class=""> - Daniel</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Dec 4, 2015, at 3:49 PM, Harlan Haskins <<a href="mailto:harlan@harlanhaskins.com" class="">harlan@harlanhaskins.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">+swift-users, again</div><div class=""><br class=""></div><div class="">Yes, the flash struct is necessary, and we can’t really rename it. 😕</div><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Dec 4, 2015, at 6:27 PM, Daniel Dunbar <<a href="mailto:daniel_dunbar@apple.com" class="">daniel_dunbar@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">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.</div><div class=""><br class=""></div><div class="">Is the header that defines said struct in the flipper necessary for your client?</div><div class=""><br class=""></div>(FYI probably best to keep swift-users in the CC list if possible just so others can benefit from the info).<div class=""><br class=""></div><div class=""><div class=""> - Daniel</div></div><div class=""><br class=""></div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Dec 4, 2015, at 3:16 PM, Harlan Haskins <<a href="mailto:harlan@harlanhaskins.com" class="">harlan@harlanhaskins.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Ah! I somehow missed that keyword in the docs.<div class=""><br class=""></div><div class="">However, it seems the path is <font face="Menlo" class="">/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/curses.h</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class="">If I intend this to be cross-platform, how can I exclude that file in a non-Mac specific way?</div><div class=""><br class=""></div><div class="">Also it doesn’t seem to be excluding anything — I still get the issue.</div><div class=""><br class=""></div><div class="">My file is currently</div><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" class="">module CFlipper [system] {</font></div><div class=""><font face="Menlo" class=""> exclude header "/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/curses.h"</font></div><div class=""><font face="Menlo" class=""> exclude header "/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/search.h"</font></div><div class=""><font face="Menlo" class=""> umbrella "/Users/harlan/.flipper/include/"</font></div><div class=""><font face="Menlo" class=""> link "flipper"</font></div><div class=""><font face="Menlo" class=""> export *</font></div><div class=""><font face="Menlo" class="">}</font></div></div><div class=""><br class=""></div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Dec 4, 2015, at 6:08 PM, Daniel Dunbar <<a href="mailto:daniel_dunbar@apple.com" class="">daniel_dunbar@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Try using:<div class=""> exclude header "/path/to/header.h"</div><div class="">in the module definition.</div><div class=""><br class=""></div><div class=""> - Daniel</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Dec 4, 2015, at 3:06 PM, Harlan Haskins <<a href="mailto:harlan@harlanhaskins.com" class="">harlan@harlanhaskins.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi all,<div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">Is there any way I can specifically exclude `curses.h` from my modulemap file? It’s a very simple file.</div><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" class="">module CFlipper [system] {</font></div><div class=""><font face="Menlo" class=""> umbrella "/usr/local/include/flipper/"</font></div><div class=""><font face="Menlo" class=""> link "flipper"</font></div><div class=""><font face="Menlo" class=""> export *</font></div><div class=""><font face="Menlo" class="">}</font></div></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=AdkfTiApI80cNEyortTzHbERtY5det-2FDBvSxuhs4q2OVL0-2By-2FOdODTojyukwMgrPoomEIdej3GVZTPqTgmcqvKI7-2FZTO2i0MU8ohfw9duB8O2e4-2BPyHIm8k5hBpKJfWhrdiDWfXbbMxlq1eZlJBytjOGyA1FGw-2B-2B7RVqxyMluLRp8si2UuIhcnLCjEZaAWfdsA9N7r-2BzW4C6eKP91aEDQaR5kzbEZIDSt8oseGU6Au8-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
</div>
_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-users" class="">https://lists.swift.org/mailman/listinfo/swift-users</a><br class=""></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class="">
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=z0Ft8gvIaLt1zLwfkl4og6osLD9N8tlWJY1PY2zqWLWOaMkIFVBFnIqdeH4wHsllFUIJxZm-2BUppCwxn2rW7V7G5-2F1yQoIpztyhFGu-2Bc4rFOXHcDZhZNP9sbykFY4rc1Nz7RWem1-2F5P0pjnPbEfteXjIDEefcMW1DbS2v8Il6VaceJY-2BrN9-2B01eTK5Gld-2F0Fmi4KEL7MWT6PcfXMtEx8yBzVHgK-2B-2FHseGMQ5vZrgnBJg-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;">
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-users mailing list</span><br><span><a href="mailto:swift-users@swift.org">swift-users@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-users">https://lists.swift.org/mailman/listinfo/swift-users</a></span><br></div></blockquote></body></html>