Closed GoogleCodeExporter closed 9 years ago
Ok, the problem was that it was using the "old" headers from
/opt/local/include/yaml-cpp/emitter.h. I think this behavior is new. Should'nt
the make script first include the local directory before including system
directories?
I think was no issue in the past.
Original comment by m...@riedel-privat.de
on 16 Jan 2012 at 4:00
Hmm, you're right, I'll check this out.
Original comment by jbe...@gmail.com
on 16 Jan 2012 at 7:16
If it's a OSX thing, I can also try to locate the problem.
Original comment by m...@riedel-privat.de
on 16 Jan 2012 at 7:47
It may be, but I'm on OS X also, and I've installed to /usr/local/include (not
/opt/local/include), and it works fine.
It may be something strange going on with your $PATH, but I would have expected
the make script to include the local directory first. I'd be happy if you
wanted to investigate :)
Original comment by jbe...@gmail.com
on 16 Jan 2012 at 8:34
I'll have two more Macs. Let's see if it's configuration specific. I'll check
it out tomorrow.
Original comment by m...@riedel-privat.de
on 16 Jan 2012 at 8:50
Ok, I located the problem:
In the root CMakeLists.txt, you have to put
include_directories(${YAML_CPP_SOURCE_DIR}/include)
include_directories(${YAML_CPP_SOURCE_DIR}/src)
before any other include_directories call. Currently, for the new API
include_directories(${Boost_INCLUDE_DIRS}) comes first, which causes my error
(adds /opt/local/include).
I would put it prior to
if(YAML_CPP_BUILD_OLD_API) ...
Thanks.
Original comment by m...@riedel-privat.de
on 18 Jan 2012 at 8:36
So, apparently your boost installation is not in /usr/local/include :)
Original comment by m...@riedel-privat.de
on 18 Jan 2012 at 9:00
OK, I made this change (rc4ba56b754f9). Can you verify that it works?
By the way, I've switched the new API to its own branch (instead of being a
compiler flag). So you'll have to update to the "new-api' branch:
hg up new-api
Original comment by jbe...@gmail.com
on 21 Jan 2012 at 6:23
Thanks for the fix. Apart from having to change append to push_back *g,
everything works fine.
Original comment by m...@riedel-privat.de
on 21 Jan 2012 at 11:22
Oh, sorry about that change - I am trying to keep things generally stable, but
on the wiki, dan.eloff made a point in favor of push_back that I hadn't thought
of (that it works with std::back_inserter), and that convinced me.
Original comment by jbe...@gmail.com
on 22 Jan 2012 at 12:00
*g is a smily in Germany. So no problem at all.
Original comment by m...@riedel-privat.de
on 22 Jan 2012 at 12:06
That's really funny! Cultural differences...
Original comment by jbe...@gmail.com
on 22 Jan 2012 at 1:14
Original issue reported on code.google.com by
m...@riedel-privat.de
on 16 Jan 2012 at 12:56Attachments: