[op25-dev] Building under Ubuntu 12.04 - blocks gives error "op25.cc:3115:13: error: 'ptrdiff_t' does not name a type"
richard at clarke.biz
Thu May 10 03:07:02 UTC 2012
For anyone else having the same problem, a temporary hack solution is to
edit the generated file op25.cc after the first make fails, and add
#include <cstddef> right near the top of that file. I know the 'correct'
way is to edit the op25.i swig interface file and add it to the includes
there but as I previously said, I couldn't get that to work. Someone with
more swig knowledge than me can probably figure that out in due course. In
the interim this little hack will get ../op25/blocks to build.
On 3 May 2012 09:21, Richard Clarke <richard at clarke.biz> wrote:
> Hi Steve,
> thanks for that suggestion. I had already tried that too but no luck so
> far, same error.
> Anyone else tried building op25 with gcc 4.6.3? Are you having the same
> issue? Any more suggestions from anyone?
> Thanks very much
> On 2 May 2012 17:09, Steve Glass <stevie.glass at gmail.com> wrote:
>> Try including stddef.h in op25.i rather than cstddef. I think the latter
>> may need a "using namespace std" declaration and the former should just
>> On 2 May 2012 13:09, Richard Clarke <richard at clarke.biz> wrote:
>>> OK I've just upgraded my Ubuntu box to 12.04, from 11.04 (couldn't help
>>> myself). I'm trying to rebuild op25 but I'm getting the following error,
>>> followed by a string of relate ones (I'm guessing)
>>> Compiling blocks:
>>> op25.cc:3115:13: error: 'ptrdiff_t' does not name a type
>>> A Google search for this kind of error seems to be pointing to stricter
>>> typedef requirements by gcc 4.6 with the solution being to include an
>>> additional system header file cstddef. However I'm not sure where to
>>> include this in the op25 source. I tried putting it in the op25.i swig
>>> interface file so that it ends up in the generated op25.cc file however
>>> that doesn't appear to have worked.
>>> Anyone already solved this or can provide some guidance? Ubuntu 12.04
>>> appears to be using gcc 4.6.3
> *SCOTT ADAMS: Normal people believe that if it ain't broke, don't fix it.
> Engineers believe that if it ain't broke, it doesn't have enough features
*SCOTT ADAMS: Normal people believe that if it ain't broke, don't fix it.
Engineers believe that if it ain't broke, it doesn't have enough features
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the op25-dev