Menu

#1 printf not found in newer gcc's

v1.0_(example)
closed
None
5
2018-08-04
2009-10-04
Evan Wies
No

I started testing bitmagic on Ubuntu Karmic (I am one of the Debian package maintainers). It appears that newer gcc's (Karmic has 4.4.1) no longer include printf anywhere in the nesting of headers that are included in bm.h. It probably somehow was included via string.h before?

The fix is simply to add #include <stdio.h> to the top of bm.h.

Perhaps you could also use <cstring>, <cassert>, and <cstdio> rather than <string.h>, <assert.h> and <stdio.h> (not a big deal though).

I did not explore too deeply -- this could be a Debian-specific bug, but you are using printf without including stdio. We are going to fix this in the Debian/Karmic package, but it would be great to have it fixed upstream too.

Thanks for a great library,
Evan

Discussion

  • Anatoliy Kuznetsov

    • status: open --> accepted
    • assigned_to: Anatoliy Kuznetsov
    • Group: --> v1.0_(example)
     
  • Anatoliy Kuznetsov

    • status: accepted --> closed
     
  • Anatoliy Kuznetsov

    Fixed in github repo

     

Log in to post a comment.