"Undefined reference to 'swab'" error when using GCC 5 and CrystaX NDK 10.3.1 x64 on Windows
The original Google Android NDK doesn't provide the
swab function, so I defined my own. After migrating to Crystax, I got the "conflicting declaration of 'void swab(const void*, void*, ssize_t)' with 'C' linkage" error. So I removed my implementation and compilation succeeded, but now linker can't find the definition for this function.
#4 Updated by Dmitry Moskalchuk over 3 years ago
Violet Giraffe wrote:
P. S. I "fixed" the error by making my definition
extern "C", but I still wonder if there's something missing in the NDK itself. Or, if
swabis being declared by mistake.
Yes, this is bug. @swab@ is declared in system headers but not implemented. I'm going to fix it. Thank you for report.
#5 Updated by Dmitry Moskalchuk over 3 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
"Fixed":https://github.com/crystax/android-platform-ndk/commit/f86dbdb4c886508999a50da8eb165539a18e511c. Will be available in libcrystax starting from NDK build #797 (https://dl.crystax.net/builds/).