Loki-Astari / ThorsSerializer

C++ Serialization library for JSON

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Linker Error?

IMB11 opened this issue · comments

I tried to compile the example, I did #define HEADER_ONLY 1 but it provides a linker error?

error: undefined symbol: ThorsAnvil::Serialize::defaultPolymorphicMarker
>>> referenced by ThorsSerializerUtil.h:249

Sorry to hear that.
Let me try (Its been a while since I did the header only version).

  1. Remember that you should not define HEADER_ONLY this is defined for you.
    See: ThorSerialize/SerializeConfig.h
  2. To use the header only version you should check out the appropriate branch.
    git clone --single-branch --branch header-only https://github.com/Loki-Astari/ThorsSerializer.git
  3. In your code you may need to include "ThorSerialize/ThorsSerializerUtil.h" in one of your files.
    This has defaultPolymorphicMarker defined in it.

I am sorry about the header only version.
I don't use so it does not get the best checks.

For the best usage you can pull from homebrew (mac) linuxbrew (linux/Windows) then you don't need to build anything.

Let me know if this solves your problem.

I'm compiling this for an android c++ app, so header only really is my only option at the minute.

This fixed it anyways, thanks 👍

Have massively cleaned up the header only version.