billyquith / ponder

C++ reflection library with Lua binding, and JSON and XML serialisation.
http://billyquith.github.io/ponder/
Other
640 stars 93 forks source link

Format functions missing PONDER_API #55

Closed Weeena closed 6 years ago

Weeena commented 7 years ago

I am building ponder as a DLL under Windows. When I tried to build your Lua test program from the main.cpp in the test\lua folder, I got a linker error

error LNK2019: unresolved external symbol "void cdecl ponder::detail::fmt::print(class ponder::detail::fmt::BasicCStringRef,class ponder::detail::fmt::ArgList)" (?print@fmt@detail@ponder@@YAXV?$BasicCStringRef@D@123@VArgList@123@@Z) referenced in function "void cdecl ponder::detail::fmt::print<char [8]>(class ponder::detail::fmt::BasicCStringRef,char const (&)[8])" (??$print@$$BY07D@fmt@detail@ponder@@YAXV?$BasicCStringRef@D@012@AAY07$$CBD@Z)

The reason for this error is that the function print() from format.hpp is not exported. Putting PONDER_API to the declaration of print() resolved the problem.

Sidemark: I guess that print(CStringRef format_str, ArgList args) is not the only function that currently is not exported.

billyquith commented 7 years ago

Thanks for the report. Format is a 3rd party library. I've tried to choose best-in-class third party components where applicable. No sense rewriting something a community has slaved over!

There isn't a CI test for dynamic DLLs on Windows. I think that is the only platform that suffers from this.

billyquith commented 6 years ago

The format library has been removed. See #59.