Hey everyone!
I want to use Jansson for a project in which I have to create JSON data and send them to a server, but I have to work with Windows Visual Studio 2012 (Ultimate version) on a Windows 7 machine.
I've already searched all over the internet the proper way to make it work, but I'm really having a hard time with the install/configuration of Jansson: what am I missing?
I've downloaded the most recent version from here
and then tried what it said here
which say that - essentially - I can install it in two different ways. I've tried them both:
1) "Jansson can be built with Visual Studio 2010 (and probably newer versions, too). The solution and project files are in the win32/vs2010/ directory in the source distribution."
If I get it right (i'm not english mothertongue) in this case I just have to go into the win32/vs2010 folder and open the jansson visual studio project file, and then build it.
First thing: when I double click on the file it asks me to "update the project to use the Visual C++ 2012 compiler and libraries". Here I chose to update.
Then, from the upper menu bar I chose "Build/Build this solution" and this is what I had as output
"1>------ Build started: Project: jansson, Configuration: Debug Win32 ------
1> value.c
1> utf.c
1> strconv.c
1> strbuffer.c
1> pack_unpack.c
1> memory.c
1> load.c
1> hashtable.c
1> error.c
1> dump.c
1> Generating Code...
1> Creating library Output\Debug\jansson.lib and object Output\Debug\jansson.exp
1> jansson.vcxproj -> C:\Users\Operator3\Desktop\akheron-jansson-6b1cba9\win32\vs2010\Output\Debug\jansson.dll"
So apparently all worked properly.
But if now I create a new project (Visual C++ / Win32 Console Application - empty project) and I write in it
#include <jansson.h>
it returns an error saying that it cannot open it.
Why? What am I missing?
2) "
This method is deprecated. Using CMake is now preferred."
After having done that, I opened cmd, set the cd to Desktop\akheron-jansson-6b1cba9 and wrote "make". Didn't worked. Tried with "cmake". Returned the list of all the possible ways to use the command, and so i finally tried "cmake -i" which seemed to work. After some time and some messages, it ended saying
"Cmake completed. Run make to build project."
...and so i'm also stuck in this way, because simply writing "make" in the cmd don't work.
So, two ways and i'm stuck with both. :(
Can anybody help?
TY (and sorry for the long post, but I wanted to make it as clear as i can)