Reputation: 3539
Naclports seems to just provide a 32-bit object files, how do I get my project to link against them? Is there any tutorials on how someone uses jsoncpp in a nacl program?
Upvotes: 1
Views: 309
Reputation: 3575
I've created a sample for you that you can checkout here:
https://github.com/johnmccutchan/NaClJsonCpp
The build system is premake based, you can download premake4 here:
http://industriousone.com/premake
From a terminal (cygwin or *nix):
premake4 gmake
make -R
Will build and link the project.
To test it run:
python ./http.py
then navigate to localhost:5103. You should see the following:
NaCl Json Cpp Test
Status: SUCCESS
Loading plug-in ruby
Loading plug-in c++
Loading plug-in python
Sample Running.
Instance Built: 14:41:31 (Sep 5 2012)
To see how Json Cpp was used see the function JsonCPP in nacl_sample_main.cpp.
Let me know if you have any questions.
Upvotes: 3