I'm using a specific toolchain (the one that comes with the BlackBerry Playbook NDK). I think it's based on GCC 4.4.2. When I try compiling certain libraries with this toolchain, I run into strange issues with what I think is c++ global namespace stuff. For example, I'll get errors like:
'::sprintf' has not been declared
I never get these errors when linking against the GNU c++ standard library. However, the Playbook NDK uses the Dinkumware C++ libs by default and I always have to go through each error and usually add in the C equivalent (stdio.h in this case). For reasons beyond my control, I can't link to the GNU c++ standard library, which doesn't exhibit any of these problems.
If I'm trying to compile a bigger project, I can get hundreds of these errors. Is there a workaround that doesn't involve editing the source? In the above example, the file would usually include "cstdio" as a header, but that declares sprintf under the 'std' namespace. So the only options I have are to include the C header or add the std namespace.