You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was interested in running this code on my Mac (running OS X 10.9.5). The only compilation issue was that on Macs, the native C compiler is clang (gcc redirects to it), and clang handles function inlining a little differently than gcc. For a description of the issue, see: http://clang.llvm.org/compatibility.html#inline
Anyway, the fix here is to delete "inline" from (most of) the inlined functions. There are two static inline functions in util.c that can remain:
static inline int meshgraph_add_vertex_neighbor(meshgraph_t *g, int i, int vertex, int edge)
static inline int meshgraph_add_edge_neighbor(meshgraph_t *g, int i, int vertex, int face)
With this change, everything compiles.
I wanted to ask you if you would consider making an option for automatically dropping the inlining (I guess through make install?) when compiling on a Mac; it would be great if people like me could use this code out-of-the-box.
Thanks,
Bill
The text was updated successfully, but these errors were encountered:
I have a tight schedule at work at the moment, so I can't fix this in the near future. Also, I don't have a Mac platform available to test it. However, you are more then welcome to provide a pull request.
I guess it could be as easy as 1) detecting the Mac platform in the Makefile, 2) add a -D OSX flag to the CCFLAGS (compile flags) in case we're on a Mac and 3) switch the inline functions to a non-inline version if the define is set via #ifdef-s (that's what you did manually now, right?).
Dear Sebastian,
I was interested in running this code on my Mac (running OS X 10.9.5). The only compilation issue was that on Macs, the native C compiler is clang (gcc redirects to it), and clang handles function inlining a little differently than gcc. For a description of the issue, see: http://clang.llvm.org/compatibility.html#inline
Anyway, the fix here is to delete "inline" from (most of) the inlined functions. There are two static inline functions in util.c that can remain:
static inline int meshgraph_add_vertex_neighbor(meshgraph_t *g, int i, int vertex, int edge)
static inline int meshgraph_add_edge_neighbor(meshgraph_t *g, int i, int vertex, int face)
With this change, everything compiles.
I wanted to ask you if you would consider making an option for automatically dropping the inlining (I guess through make install?) when compiling on a Mac; it would be great if people like me could use this code out-of-the-box.
Thanks,
Bill
The text was updated successfully, but these errors were encountered: