<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    I am a boost newbie, and this is my first post :-)<br>
    <br>
    I am inserting boost into my application using pre-compiled headers
    on Windows.<br>
    The pre-compiled header looks like this:<br>
    <br>
    <font face="Courier New, Courier, monospace">#ifndef
      PRECOMPILEDHEADERS_WINRT_SRC_MAIN_INCLUDE_PRE_COMPILED_H_<br>
      #define PRECOMPILEDHEADERS_WINRT_SRC_MAIN_INCLUDE_PRE_COMPILED_H_<br>
      <br>
      // Standard integer types<br>
      #include &lt;stdint.h&gt;<br>
      <br>
      // Includes for d2d libraries<br>
      #include &lt;wrl.h&gt;<br>
      #include &lt;d3d11_1.h&gt;<br>
      #include &lt;d2d1_1.h&gt;<br>
      #include &lt;d2d1effects.h&gt;<br>
      #include &lt;d2d1_1helper.h&gt;<br>
      #include &lt;dwrite_1.h&gt;<br>
      #include &lt;wincodec.h&gt;<br>
      #include &lt;math.h&gt;<br>
      #include &lt;agile.h&gt;<br>
      <br>
      // Includes for STL types<br>
      #include &lt;string&gt;<br>
      #include &lt;vector&gt;<br>
      #include &lt;set&gt;<br>
      #include &lt;map&gt;<br>
      #include &lt;memory&gt;<br>
      #include &lt;exception&gt;<br>
      #include &lt;collection.h&gt;<br>
      <br>
      // Includes for Windows error<br>
      #include &lt;winerror.h&gt;<br>
      <br>
      // Includes for Boost libraries<br>
      #include "boost/exception/all.hpp"<br>
      #include "boost/optional.hpp"<br>
      #include "boost/variant.hpp"<br>
      #include "boost/exception_ptr.hpp"<br>
      #include "boost/date_time/posix_time/posix_time_types.hpp"<br>
      #include "boost/archive/text_oarchive.hpp"<br>
      #include "boost/archive/text_iarchive.hpp"<br>
      #include "boost/serialization/access.hpp"<br>
      #include "boost/serialization/vector.hpp"<br>
      #include "boost/serialization/string.hpp"<br>
      <br>
      // Includes for devices communications<br>
      #include "boost/interprocess/sync/named_mutex.hpp"<br>
      #include "boost/interprocess/sync/scoped_lock.hpp"<br>
      #include "boost/archive/binary_oarchive.hpp"<br>
      #include "boost/archive/binary_iarchive.hpp"<br>
      <br>
      #endif //
      PRECOMPILEDHEADERS_WINRT_SRC_MAIN_INCLUDE_PRE_COMPILED_H_<br>
    </font><br>
    However when I attempt to compile this through maven, using the
    maven-nar-plugin, on a Windows 8 machine, I get the following error:<br>
    <br>
    <font face="Courier New, Courier, monospace">[INFO] ---
      maven-nar-plugin:2.25:nar-compile (default-nar-compile) @
      precompiledheaders-winrt ---<br>
      [INFO] Compiling 1 native files<br>
      [INFO] Looking for WinRT dependencies<br>
      [ERROR]
C:\Users\marcusma\Source\1edit-prism\precompiledheaders\winrt\external-sources\boost/interprocess/detail/os_file<br>
      _functions.hpp(94) : error C2039: 'getenv' : is not a member of
      'std'<br>
      [ERROR]
C:\Users\marcusma\Source\1edit-prism\precompiledheaders\winrt\external-sources\boost/interprocess/detail/os_file<br>
      _functions.hpp(94) : error C3861: 'getenv': identifier not found</font><br>
    <br>
    This appears to be correct, getenv according to the MSDN
    documentation is not available when compiling code for WinRT, using
    Visual Studio 12, on a Windows 8 machine.<br>
    <br>
    I understood that boost was supposed to be multi-platform, so why is
    std::getenv being used, which is not available for Windows?<br>
    <br>
    Can someone suggest what I need to do to get my pre-compiled headers
    to compile.<br>
    <br>
    Cheers,<br>
    <pre class="moz-signature" cols="72">-- 
Marcus A.T MacWilliam, Senior Software Engineer. 1Spatial Ltd.
Tel: +44 (0)1223 420414, ext 2289,    Mob: +44 (0)7803 706597.
E-Mail: <a class="moz-txt-link-abbreviated" href="mailto:marcus.macwilliam@1spatial.com">marcus.macwilliam@1spatial.com</a> Skype:marcus.macwilliam

Tennyson House, 7 Cambridge Business Park, Cambridge, CB4 0WZ.
Registered in England No. 4785688,     VAT Reg. No. 135539408.
Website: <a class="moz-txt-link-freetext" href="http://www.1spatial.com/">http://www.1spatial.com/</a>    E-mail: <a class="moz-txt-link-abbreviated" href="mailto:info@1spatial.com">info@1spatial.com</a></pre>
  </body>
</html>

