Closed GoogleCodeExporter closed 8 years ago
Firstly, try #including "a_base.h" in the source file csved_cli.cpp - it should
be
included but currently isn't, at least directly. If that doesn't work, take
look at
this line in csved_cli.cpp:
width = ALib::Max( width, cmds[j].size() );
You can try changing it to look like this:
width = std::max( width, cmds[j].size() );
which will use the C++ standard library max() template. The ALib version is
intended
to avoid problems like this, but I guess it has failed :-(
This code has compiled succesfully for me on Fedora and for other people, so I
am a
bit bemused why it should not work on your version of Ubuntu.
Could you please post any more questions like this in the support group? I
don't want
to stop people using the issue tracker, but I feel it is better if issues are
discussed informally before they are entered in the tracker.
Original comment by nbutterworth1953@gmail.com
on 12 Sep 2009 at 5:23
[deleted comment]
Erik - I forgot to say Thanks Very Much for your very useful input.
Original comment by nbutterworth1953@gmail.com
on 12 Sep 2009 at 5:38
On mature reflection, and considering the C++ issues involved here, the error:
src/csved_cli.cpp:110: error: no matching function for call to
Max(unsigned int&, size_t)
is probably because templates don't do type conversion and I only provide a
Max()
function templated on one type. On your version of Ubuntu, a size_t is probably
not
an unsigned int. The quick and dirty way to fix it is to make it so:
width = ALib::Max( width, (unsigned int) cmds[j].size() );
I will probably go back to using the std::max function in later releases.
Please let
me know which (if any!) of my suggestions fixes the problem.
Cheers,
NeilB
Original comment by nbutterworth1953@gmail.com
on 12 Sep 2009 at 5:58
Correct, I should have mentioned I was running 64-bite which would make my
size_t 8
bytes instead of 4.
Casting it as unsigned int did in fact fix it and it correctly builds now.
Thank you for your help!
Original comment by ErikTJac...@gmail.com
on 12 Sep 2009 at 10:00
Original comment by nbutterworth1953@gmail.com
on 13 Sep 2009 at 7:09
Original issue reported on code.google.com by
ErikTJac...@gmail.com
on 10 Sep 2009 at 3:56