akheron / jansson

C library for encoding, decoding and manipulating JSON data
http://www.digip.org/jansson/
Other
3.05k stars 809 forks source link

Error compilation under VS2017, x64 #562

Open stef-pellegrino opened 3 years ago

stef-pellegrino commented 3 years ago

Hi, Get this when I'm trying to import into a dll a static jansson lib. (compiled with VS2017 x64, windows 10)

jansson.a.lib(value.c.obj) : error LNK2019: unresolved external symbol impdclass referenced in function json_real jansson.a.lib(load.c.obj) : error LNK2019: unresolved external symbol __imp_strerror referenced in function json_load_file jansson.a.lib(strconv.c.obj) : error LNK2019: unresolved external symbol __imp_strtod referenced in function jsonp_strtod

Any ideas ? Thanks

VaibhavTekale1 commented 3 years ago

Hi we are facing the same issue. can you please let us know if you have got the solution ?

ploxiln commented 3 years ago

These appear to be libc functions. I don't know anything about windows / VS compilation. But you may have to explicitly specify the equivalent of -lc to also link with libc at the same time.

sangshuduo commented 1 year ago

VS2022 can build out on my side.