Menu

#42 amalgamate.py patch, fixes #include and assertions.h

0.5.0
closed-fixed
nobody
None
5
2015-03-06
2012-01-25
Anonymous
No

I have attached a patch to this,

For the assertions.h header change,
It is different from Francis Bolduc's patch, which can be found here:
http://sourceforge.net/mailarchive/message.php?msg_id=28671263

Francis puts assertions.h before config.h, but assertions.h normally wants
config.h to be included so it should come second.

I have also adjusted the way jsoncpp.cpp includes its header file...
the python script would make it include the file like so:
#include <json/json.h>
but that does not compile in my environment as the json include folder is
not in the global includes, nor does it need to be.

So I have changed it so the generated .cpp file will say instead:
#include "json/json.hpp"
which works perfectly as the compiler will search for the header file
relative to where the .cpp file was placed.

That way, if you copy the dist folder into your project (and rename it to eg jsoncpp),
then all you need to do is add the .cpp file to the list of files to compile.
You can then include the json file like so:
#include <project_utils/jsoncpp/json.h>
rather than using a global include folder, if that is how your project is structured.

Discussion

  • Christopher Dunn

    • status: open --> closed-fixed
    • Group: --> 0.5.0
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.