Hi all,
The issue I'm encountering was previously discussed and solved in this thread: http://createdigitalnoise.com/discussion/302/using-expr-in-libpd/p1
But that solution isn't working anymore.
To reiterate:
#include
#include
#include
#if !(TARGET_IPHONE_SIMULATOR)
int finite(double x){return isfinite(x);}
double drem (double x, double y){return remainder(x, y);}
#endif
XCode complains about drem and finite as if the fix were not applied.
Anyone have any theories as to why?
Nobody has encountered this? It seems to me that we can't use the expr~ library with the latest version of XCode. For me that's a dealbreaker. I'd love to be wrong!
I'm still at XCode 4.4, so I can't try this right now. Anyone...?
Hi Peter,
You can have multiple copies of Xcode on your computer. I do. Since XCode 4.3, they've been 'Application Bundles', which means that everything for the application is contained in the .app file. You can rename those to include the version number.
You can download XCode 4.5 here: https://developer.apple.com/downloads/index.action
If you want, you can use the 'select' command to tell your Mac which version you intend to use: http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/xcode-select.1.html
Anyway, maybe this will inspire you to try this out yourself :-)
Is that block of code in the #if / #endif statements getting used on your device (you are trying to build for the device, right?)? You can check by putting a
#warning "this is getting compiled"
in-between. If it were getting compiled, you would at least get other warnings, because you are defining it there.
Are you #including TargetConditionals.h?
I am including TargetConditionals.h. It got stripped out of the code above...
On both XCode 4.4.1 and 4.5.2, 'this is getting compiled' shows up in the Issues Navigator.
But on XCode 4.5.2, the build fails and we get the following messages:
'finite' is unavailable: not available on iOS
'drem' is unavailable: not available on iOS
followed by...
Apple LLVM compiler 4.1 Error: Too many errors emitted, stopping now
So maybe nobody cares that we can't use expr~ with the latest versions of iOS?
Again, hopefully it's my error, but I don't think so. I just added expr~ to a working project and that project stopped working in the newest version of XCode.
Any help would be appreciated!
The problem is that vexp_fun.c uses some deprecated functions that seem to have been removed from recent versions of XCode. Try these changes instead of the fix you mentioned above:
Rewrite line 1276 like this: FUNC_DEF_UNARY(ex_finite, isfinite, (double), 0);
Rewrite line 1291 like this: FUNC_DEF(ex_drem, remainder, (double), (double), 1);
Please let me know whether this solves the problem. If it does, I'll submit the patch to Miller.
Well, that was embarrassingly easy! I got so caught up in 'it should work!' that I failed to just MAKE it work.
Thank you. It works!
The functions were equally deprecated in previous versions of XCode, so I'm not sure why the original fix didn't work in this version. It's not that important to me, but sometimes it's nice to know why something didn't work...
Glad it works. I pushed the change to GitHub and submitted the patch to Miller.
It looks like you're new here. If you want to get involved, click one of these buttons!