0

I'm playing around with android development and I'm running into the named error in the "return" line.

C++ is NOT my playground, so, any help is welcome... ;-)

#include <stdint.h>
#include <utils/Errors.h>

namespace android
{
    /* status_t Parcel::writeString16 */
// android::Parcel::writeString16(char16_t const*, unsigned int) (bt): 2019-01-26
    extern "C" status_t _ZN7android6Parcel13writeString16EPKDsj(const char16_t* str, size_t len);
// android::Parcel::writeString16(unsigned short const*, unsigned int) (bt): 2019-01-26
    extern "C" status_t _ZN7android6Parcel13writeString16EPKtj(const char16_t* str, size_t len)
    {
// android::Parcel::writeString16(char16_t const*, unsigned int) (bt): 2019-01-26
        return _ZN7android6Parcel13writeString16EPKDsj(str, len);
    }
};
Bernhard
  • 1
  • 4
  • 1
    an extern "C" in a namespace? with a mangled name? Try remove the namespace first. – Matthieu Brucher Jan 28 '19 at 14:36
  • And link with the library that provides `_ZN7android6Parcel13writeString16EPKDsj` – Matthieu Brucher Jan 28 '19 at 14:44
  • 1
    Possible duplicate of [What is an undefined reference/unresolved external symbol error and how do I fix it?](https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – Matthieu Brucher Jan 28 '19 at 14:46
  • Seems like someone doesn't want to properly wrap their C++ functions. Anyhow, please provide a [mcve]. – Passer By Jan 28 '19 at 15:20
  • This code is NOT from me! I don't know which library provides this line of code. This code is taken from a device tree for LineageOS 15.1 (android oreo) found at github. I've tried to remove the namespace but that doesn't help and wheresoever I take a look, all people are using namespace. I've tried to remove the extern "C" but that doesn't help. I can't provide a "mcve". Or should I post the whole android source code? ;-) Here is the related tree; part libshims https://github.com/AICP/device_sony_rhine-common – Bernhard Jan 29 '19 at 15:27

0 Answers0