zserge / jsmn

Jsmn is a world fastest JSON parser/tokenizer. This is the official repo replacing the old one at Bitbucket
MIT License
3.67k stars 781 forks source link

issues with there being no jsmn.c #153

Closed sparky4 closed 5 years ago

sparky4 commented 5 years ago

src/lib/jsmn/jsmn.h(456): Warning! W202: Symbol 'jsmn_init' has been defined, but not referenced src/lib/jsmn/jsmn.h(265): Warning! W202: Symbol 'jsmn_parse' has been defined, but not referenced

this is with #define JSMN_STATIC in 16_map.h

it is for https://github.com/sparky4/16/

pt300 commented 5 years ago

JSMN is now a header only library. That means the jsmn.c file doesn't exist and to use jsmn only the jsmn.h file needs to be included.

sparky4 commented 5 years ago

it seems to be causing warnings with compiling for the game i am working on. the compiler is open watcom 2.0

pt300 commented 5 years ago

I see no issue. You just provided some warnings about jsmn symbols being defined but not referenced.

sparky4 commented 5 years ago

the compiler is confused i think

pt300 commented 5 years ago

There's not enough information about this problem nor it seems like a problem with jsmn itself. Are you able to provide something more specific?

sparky4 commented 5 years ago

oooh when the jsmn.h is called by another c header file it gives the warnings. so jsmn.h must be called by the .c file that uses it. ah

sparky4 commented 5 years ago

If you include the jsmn.h file in the C file it is needed in it will not spew warnings.