Linker Error?
IMB11 opened this issue · comments
Calum H. commented
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
Loki Astari commented
Sorry to hear that.
Let me try (Its been a while since I did the header only version).
Loki Astari commented
- Remember that you should not define HEADER_ONLY this is defined for you.
See:ThorSerialize/SerializeConfig.h
- 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
- In your code you may need to include "ThorSerialize/ThorsSerializerUtil.h" in one of your files.
This hasdefaultPolymorphicMarker
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.
Loki Astari commented
Let me know if this solves your problem.
Calum H. commented
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 👍
Loki Astari commented
Have massively cleaned up the header only version.