Open mrdevis opened 8 years ago
Seems weird. You'll notice that on line 38 of onsetsds.c, onsetsds_phase_rewrap
is definitely defined: https://github.com/glastonbridge/SuperCollider-Android/blob/master/jni/Source/plugins/onsetsds.c#L38 So I can only presume your compiler is insane...
maybe has something to do with being inline?
... any cures known for an insane compile/linker??
Hello everyone,
I've encountered the same issue (OSX Yosemite, crystax-ndk-10.3.1); I changed the lines
// the MSVC 2005 compiler is not up to date with inline float onsetsds_phase_rewrap(float phase); float onsetsds_phase_rewrap(float phase){ return (phase>MINUSPI && phase<PI) ? phase : phase + TWOPI * (1.f + floorf((MINUSPI - phase) * INV_TWOPI)); }
// Inline inline float onsetsds_phase_rewrap(float phase); inline float onsetsds_phase_rewrap(float phase){ return (phase>MINUSPI && phase<PI) ? phase : phase + TWOPI * (1.f + floorf((MINUSPI - phase) * INV_TWOPI)); }
to this:
// FRD ADD /*
/ // END FRD ADD // the MSVC 2005 compiler is not up to date with inline float onsetsds_phase_rewrap(float phase); float onsetsds_phase_rewrap(float phase){ return (phase>MINUSPI && phase<PI) ? phase : phase + TWOPI * (1.f + floorf((MINUSPI - phase) \ INV_TWOPI)); }
// FRD ADD /*
// Inline inline float onsetsds_phase_rewrap(float phase); inline float onsetsds_phase_rewrap(float phase){ return (phase>MINUSPI && phase<PI) ? phase : phase + TWOPI * (1.f + floorf((MINUSPI - phase) * INV_TWOPI)); }
*/ // END FRD ADD
and it worked. onsetsds.c.zip
I get the same error messages on macOS High Sierra 10.13.6 with crystax-ndk-10.3.2. The workaround from @FRD93 works fine for me as well.
Hi, Following your itinerary to build SC-Android, the instruction ndk-build fails with the linker complaining::
jni/Source/plugins/onsetsds.c:400: error: undefined reference to 'onsetsds_phase_rewrap' jni/Source/plugins/onsetsds.c:415: error: undefined reference to 'onsetsds_phase_rewrap' jni/Source/plugins/onsetsds.c:442: error: undefined reference to 'onsetsds_phase_rewrap' jni/Source/plugins/onsetsds.c:458: error: undefined reference to 'onsetsds_phase_rewrap' collect2: error: ld returned 1 exit status
This is on OSX10.10.5, crystax-ndk-10.3.1 Something known??
Thanks for any pointers!
Jeroen