problem with Jannson.h

Hey guys I am doing a project,the project is to make a malware scannner or in other words a program that gets the md5 of a file and matches it with known malware md5 hashes

anyway I had problems with the VirusTotal api it needed a header called jannson.h so I found the project jansson and I downloaded all the source files from github

I added all the source files from Jansson to my project but I am still getting quite a number of errors some that just don't make sense to me in the macros


I added all the source files from the jansson project to my project but am still getting quite a number of errors

C:\Users\User\Documents\threetry\jansson.h:38: error: operator '||' has no left operand
#if JSON_HAVE_ATOMIC_BUILTINS || JSON_HAVE_SYNC_BUILTINS

C:\Users\User\Documents\threetry\jansson.h:67: error: #if with no expression

C:\Users\User\Documents\threetry\jansson.h:109: error: #if with no expression

C:\Users\User\Documents\threetry\jansson.h:112: error: #elif with no expression

C:\Users\User\Documents\threetry\check_report_task.cpp:20: error: VtFile.h: No such file or directory

here is jansson.h

there is a left operand though :/

here is jansson.h https://github.com/akheron/jansson/blob/master/src/jansson.h
What's the value of JSON_HAVE_ATOMIC_BUILTINS ?
Hi repeater,

can't seem to find the value
in the read me for jansson https://github.com/akheron/jansson

there seems to be no instructions on how to install on windows
tried using cmake but to no avail,

a lot of things seem not to be found during the build,

the build finished but when I generate it no .lib files are created and I can't open project

any advice?

thanks
Last edited on
I am using a 64 bit windows 10 machine,the build for Jansson works to an extent but here is the message(s) cmake gives me

The C compiler identification is GNU 7.1.0
Check for working C compiler: C:/MinGW/bin/gcc.exe
Check for working C compiler: C:/MinGW/bin/gcc.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Detecting C compile features
Detecting C compile features - done
C compiler: GNU
Looking for include file endian.h
Looking for include file endian.h - not found
Looking for include file fcntl.h
Looking for include file fcntl.h - found
Looking for include file sched.h
Looking for include file sched.h - not found
Looking for include file unistd.h
Looking for include file unistd.h - found
Looking for include file sys/param.h
Looking for include file sys/param.h - found
Looking for include file sys/stat.h
Looking for include file sys/stat.h - found
Looking for include file sys/time.h
Looking for include file sys/time.h - found
Looking for include file sys/types.h
Looking for include file sys/types.h - found
Looking for close
Looking for close - found
Looking for getpid
Looking for getpid - found
Looking for gettimeofday
Looking for gettimeofday - found
Looking for open
Looking for open - found
Looking for read
Looking for read - found
Looking for sched_yield
Looking for sched_yield - not found
Looking for include file stdint.h
Looking for include file stdint.h - found
Looking for stddef.h
Looking for stddef.h - found
Check size of __int64
Check size of __int64 - done
Check size of int64_t
Check size of int64_t - done
Check size of long long
Check size of long long - done
Check size of int32_t
Check size of int32_t - done
Check size of __int32
Check size of __int32 - done
Check size of long
Check size of long - done
Check size of int
Check size of int - done
Check size of unsigned long
Check size of unsigned long - done
Check size of unsigned int
Check size of unsigned int - done
Check size of unsigned short
Check size of unsigned short - done
Check size of uint32_t
Check size of uint32_t - done
Check size of __uint32
Check size of __uint32 - failed
Check size of uint16_t
Check size of uint16_t - done
Check size of __uint16
Check size of __uint16 - failed
Check size of uint8_t
Check size of uint8_t - done
Check size of __uint8
Check size of __uint8 - failed
Check size of ssize_t
Check size of ssize_t - done
Check size of SSIZE_T
Check size of SSIZE_T - failed
Looking for strtoll
Looking for strtoll - found
Looking for strtoq
Looking for strtoq - not found
Looking for _strtoi64
Looking for _strtoi64 - found
Looking for include file locale.h
Looking for include file locale.h - found
Looking for localeconv
Looking for localeconv - found
Looking for setlocale
Looking for setlocale - found
Performing Test HAVE_INLINE
Performing Test HAVE_INLINE - Success
Performing Test HAVE___INLINE
Performing Test HAVE___INLINE - Success
Performing Test HAVE___INLINE__
Performing Test HAVE___INLINE__ - Success
Performing Test HAVE_SYNC_BUILTINS
Performing Test HAVE_SYNC_BUILTINS - Success
Performing Test HAVE_ATOMIC_BUILTINS
Performing Test HAVE_ATOMIC_BUILTINS - Success
Could NOT find Sphinx (missing: Sphinx-build_EXECUTABLE Sphinx_VERSION_STRING)
CMake Warning at CMakeLists.txt:377 (message):
Sphinx not found. Cannot generate documentation!

Set -DJANSSON_BUILD_DOCS=OFF to get rid of this message.


Configuring done


not sure what I can do to,don't know why there is so many failures and not founds,

could anyone try and see if they can get the jansson project to build in cmake on windows for the mingw makefile,would really appreciate it

thanks guys

Last edited on
It says configuring done. The last error message indicates that it's the documentation that didn't build. What if you just carry on from here?
hey Repeater thanks for the reply,

how would I carry on from there? I pressed generate,and it said generate done(so I am guessing it worked)

but there was no .lib files created,there is was a lib folder but it is empty,

also checked other folders no .lib exists

thanks
Last edited on
If you're running CMAKE, then the output is not a library file. The output is a makefile or a project file. Something you can use to then build the library.
thanks for the reply,

ok so when I have used cmake on the jansson project,what should I do next?

how do I actually use the file I have built with cmake in my Qt project?

thanks
ok figured out I just had to make the makefile (makes sense no pun intended)

but I am still getting an error :( when I run make in the build directory the make fails and I get some errors

make[2]: *** [CMakeFiles\jansson.dir\build.make:63: CMakeFiles/jansson.dir/src/dump.c.obj] Error 1
make[1]: *** [CMakeFiles\Makefile2:72: CMakeFiles/jansson.dir/all] Error 2
make: *** [makefile:140: all] Error 2


any suggestions?
Topic archived. No new replies allowed.