4

Environment: Windows 7, Visual Studio 2012, Pepper_34

We have an application that requires parallel processing. We used to use TBB for that. Now porting to PNaCl, we wanted to use this opportunity to switch to using a thread pool built around std::thread in C++11.

Before making the switch, the application (not using TBB) builds for PNaCl without errors.

We know that we will need C++11 for the new thread pool so I enabled C++11 with the command line -std=c++11.

Now I get several errors similar to:

T:\nacl_sdk\pepper_34\toolchain\win_pnacl\usr\include\c++\v1\cstdio(138,9): error : no member named 'snprintf' in the global namespace

So I'm surely missing a compile flag, a command line argument, a pathname or something because this error is generated from compiling cstdio.

Same kind of error when compiling

T:\nacl_sdk\pepper_34\toolchain\win_pnacl\usr\include\c++\v1\__locale and

T:\nacl_sdk\pepper_34\toolchain\win_pnacl\usr\include\c++\v1\locale

Are those pathnames correct?

So my question is what am I missing here to get rid of those errors?

Praetorian
  • 106,671
  • 19
  • 240
  • 328
Yves Poissant
  • 147
  • 1
  • 10
  • I'm not familiar with the NaCl SDK; does it use the MinGW compiler? If so, what version? What you're seeing might be [this bug](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52015) (`to_string` is described in terms of `sprintf`, so it could be the same issue). – Praetorian May 27 '14 at 20:18
  • 3
    known problem, https://code.google.com/p/chromium/issues/detail?id=314944 https://groups.google.com/forum/#!topic/native-client-discuss/_PLtANS6gkE – n. m. could be an AI May 27 '14 at 20:20
  • @Praetorian, the toolchain for PNaCl uses CLang compiler. – Yves Poissant May 27 '14 at 21:04
  • @n.m. Thanks. I took a look and did what was advised there. This sloved the global namespace symbols. But unfortunately, now CLang seem to crash with error 0xC0000005. So I find myself in a yet darker situation now. – Yves Poissant May 27 '14 at 21:08
  • @Yves Can you provide a link to a source file/project that will reproduce this crash? Thanks! – binji May 28 '14 at 21:18

0 Answers0