1
votes

While compiling code using Native client toolchain -Nacl64 (using visual studio-10), i am getting the folowing error:

logger.cpp(46,21): warning : windows.h: No such file or directory

Can't we include windows.h while using native client toolchain??

2

2 Answers

2
votes

As you've probably figured out, no. Native Client is designed to produce binaries that can run on multiple host operating systems. Including an OS-specific header wouldn't take your code in that direction.

If you are relying on something portable that happens to be defined in a non-portable header, redefine it in a header of your own.

0
votes

NaCl's toolchain is POSIX-based, so it provides POSIX headers such as fcntl.h, unistd.h and pthread.h. It does not provide a windows.h header.

In principle, Wine could be ported to NaCl so that you could use the Windows APIs defined in windows.h. But you would only be able to use interfaces that can be made to work inside NaCl's sandbox. You wouldn't be able to access devices and files outside the sandbox. Also, no-one has created such a port yet.