Remove header include that makes clang complain#83
Remove header include that makes clang complain#83sgillies wants to merge 1 commit intopygeos:masterfrom
Conversation
|
Thanks @sgillies . I really don’t understanding why this is working. If we don’t include “strtree.h”, how is “init_strtree_type” defined? I am clearly missing something as CI passes... could you help me out? |
|
A similar problem on Mac was previously solved with adding "extern" -> #79 But indeed, I also don't understand why it works without including strtree. We should probably try to add Mac testing, which should be possible on Travis (or on Azure / GitHub actions) |
|
It works because C compilers use a ton of magic 😄 Looking more closely, the compiler does warn about the implicit declaration. There are also a lot of other warnings. Perhaps a single .c file would help. There is only one extension module, lib.so, so we really only require a single source file. In fact, I'm going to close this PR because I think the single source file is really the way to go. |
|
I'm stuck here 😢 too So @sgillies if you closed your PR how did you get further ? |
|
@vincentsarago I stopped there and haven't gone further. I really do believe the way to go is one source file per extension module. If you want to try the project out as it is, removing the include statement will unblock you. |
|
@vincentsarago could you try if an approach like in #79 would help? This is clearly not a solved problem, so I opened #89 to track this / continue the discussion. |
With this include in place, the build fails and clang reports "duplicate symbol" _STRTreeType. The project builds when I remove the header include and all the tests pass on my macbook.
Here are my gcc version details: