<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=367170419-01112006><FONT face=Arial 
color=#0000ff size=2>Hi,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=367170419-01112006><FONT face=Arial 
color=#0000ff size=2>&nbsp;Another solution (which is easier to 
manage)&nbsp;would be to just&nbsp;exclude the C++ header file from the extern 
"C" {} block using the extern "C++" {} block. You might want to modify the code 
in mpidu_socki.h as below,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=367170419-01112006><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=367170419-01112006><FONT face=Arial 
color=#0000ff 
size=2>-------------------------------------------------------------</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=367170419-01112006><FONT face=Arial 
color=#0000ff size=2>/* ws2tcpip.h is a C++ header file */</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=367170419-01112006><FONT face=Arial 
color=#0000ff size=2>#ifdef __cplusplus</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=367170419-01112006>&nbsp;&nbsp;&nbsp; <FONT 
face=Arial color=#0000ff size=2>extern "C++" {</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=367170419-01112006><FONT face=Arial 
color=#0000ff size=2>#endif</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN 
class=367170419-01112006>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT 
face=Arial color=#0000ff size=2>#include &lt;ws2tcpip.h&gt;</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=367170419-01112006><FONT face=Arial 
color=#0000ff size=2>#ifdef __cplusplus</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=367170419-01112006>&nbsp;&nbsp;&nbsp; <FONT 
face=Arial color=#0000ff size=2>}</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=367170419-01112006><FONT face=Arial 
color=#0000ff size=2>#endif</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=367170419-01112006><FONT face=Arial 
color=#0000ff size=2><SPAN class=367170419-01112006><FONT face=Arial 
color=#0000ff 
size=2>-------------------------------------------------------------</FONT></SPAN></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=367170419-01112006><FONT face=Arial 
color=#0000ff size=2><SPAN 
class=367170419-01112006></SPAN></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=367170419-01112006><FONT face=Arial 
color=#0000ff size=2><SPAN 
class=367170419-01112006>Regards,</SPAN></FONT></SPAN></DIV><!-- Converted from text/plain format -->
<P><FONT size=2>----------------------------------<BR>&nbsp;Jayesh 
Krishna<BR>&nbsp;Argonne National Laboratory<BR>&nbsp;Mathematics and Computer 
Science<BR>&nbsp;Email: 
jayesh@mcs.anl.gov<BR>----------------------------------</FONT> </P>
<DIV>&nbsp;</DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> owner-mpich-discuss@mcs.anl.gov 
[mailto:owner-mpich-discuss@mcs.anl.gov] <B>On Behalf Of 
</B>devteam<BR><B>Sent:</B> Tuesday, October 17, 2006 8:44 AM<BR><B>To:</B> 
Jayesh Krishna; mpich-discuss@mcs.anl.gov<BR><B>Cc:</B> 
mpich2-maint@mcs.anl.gov<BR><B>Subject:</B> Re: [MPICH] compilation under VS2005 
- get wspiapi.h out of extern "C" block<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I finally almost got it.</FONT></DIV>
<DIV><FONT face=Arial size=2>I used mpich2.1.0.2p1 (there is no --vs05 option 
for winconfigure in the&nbsp;mpich2.1.0.4p1 version).</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I had to do several things:</FONT></DIV>
<DIV><FONT face=Arial size=2>In smpd_util project:</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; * Add smpd_job.c to the project 
</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; * add MPICH_IGNORE_CXX_SEEK 
compilation directive</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>In&nbsp;mpidu_sock.h:</FONT></DIV>
<DIV><FONT face=Arial size=2>add CPLUSPLUS_END before #include "mpidu_socki.h 
and CPLUSPLUS_BEGIN just after</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>In mpiexec project (same in smpd project) link also 
with:</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; * activeds.lib and 
netapi32.lib</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Then&nbsp;mpiexec compiles and link and there 
remains undefined symbols related to activeDir stuff. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>In order to generate mpiexec.exe I had to comment 
out references to IID_IDirectoryObject, IID_IADsContainer,</FONT><FONT 
face=Arial><FONT size=2>IID_IDirectorySearch in smpd_ad.cpp (but not in 
smpd_adreg.cpp).</FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial><FONT size=2>Andres</DIV></FONT></FONT>
<BLOCKQUOTE dir=ltr 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=jayesh@mcs.anl.gov href="mailto:jayesh@mcs.anl.gov">Jayesh 
  Krishna</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=mpich-discuss@mcs.anl.gov 
  href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Cc:</B> <A title=mpich2-maint@mcs.anl.gov 
  href="mailto:mpich2-maint@mcs.anl.gov">mpich2-maint@mcs.anl.gov</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, October 16, 2006 8:34 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> FW: [MPICH] compilation under 
  VS2005 - get wspiapi.h out of extern "C" block</DIV>
  <DIV><BR></DIV>
  <DIV dir=ltr align=left><SPAN class=050382214-16102006><FONT face=Arial 
  color=#0000ff size=2>Hi,</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=050382214-16102006><FONT face=Arial 
  color=#0000ff size=2>&nbsp;In VS 2005 there are C++ templates in some of the 
  header files (VS 2003 did not have them). So these header files should be 
  considered as C++&nbsp;header files&nbsp;rather than C header files and one 
  has to make sure that these C++ header files are outside the extern "C" {} 
  blocks in the code.</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=050382214-16102006><FONT face=Arial 
  color=#0000ff size=2>&nbsp;One such C++ header file is &lt;wspiapi.h&gt;. If 
  you make sure that this header file is not included in an extern "C" {} block 
  you should be able to get past this compilation error (Please note that this 
  header file&nbsp;may be included by some other header files in an extern "C" 
  block. To know the list of header files included by your source code and the 
  order in which they are included enable "show includes" in Visual 
  studio.).</FONT></SPAN></DIV>
  <DIV><FONT face=Arial color=#0000ff size=2><SPAN 
  class=050382214-16102006>&nbsp;This code works for Visual Studio 2003 and we 
  will be changing the code to make it compatible with VS 2005 in our next 
  release.</SPAN></FONT></DIV>
  <DIV><SPAN class=050382214-16102006><FONT face=Arial color=#0000ff 
  size=2>&nbsp;Please let us know if this works for you.</FONT></SPAN></DIV>
  <DIV><SPAN class=050382214-16102006><FONT face=Arial color=#0000ff 
  size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=050382214-16102006><FONT face=Arial color=#0000ff 
  size=2>Regards,</FONT></SPAN></DIV><!-- Converted from text/plain format -->
  <P><FONT size=2>----------------------------------<BR>&nbsp;Jayesh 
  Krishna<BR>&nbsp;Argonne National Laboratory<BR>&nbsp;Mathematics and Computer 
  Science<BR>&nbsp;Email: 
  jayesh@mcs.anl.gov<BR>----------------------------------</FONT> </P>
  <DIV>&nbsp;</DIV><BR>
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> owner-mpich-discuss@mcs.anl.gov 
  [mailto:owner-mpich-discuss@mcs.anl.gov] <B>On Behalf Of 
  </B>devteam<BR><B>Sent:</B> Monday, October 16, 2006 3:23 AM<BR><B>To:</B> 
  mpich-discuss@mcs.anl.gov<BR><B>Subject:</B> [MPICH] compilation under 
  VS2005<BR></FONT><BR></DIV>
  <DIV></DIV>
  <DIV>
  <DIV><FONT face=Arial size=2>Hello everyone,</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>We've trying to compile mpich2 under VS2005, with 
  no success yet... here is the error message.</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Any suggestions on what's going wrong 
  ?</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Thank you,</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Andres</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>in wsiapi.h</FONT></DIV>
  <DIV>&nbsp;</DIV><FONT face=Arial size=2>
  <DIV><BR>#if !defined(_WSPIAPI_COUNTOF)<BR>#if 
  !defined(__cplusplus)<BR>#define _WSPIAPI_COUNTOF(_Array) (sizeof(_Array) / 
  sizeof(_Array[0]))<BR>#else<BR>template &lt;typename __CountofType, size_t 
  _N&gt;<BR>char (&amp;__wspiapi_countof_helper(__CountofType 
  (&amp;_Array)[_N]))[_N];<BR>#define _WSPIAPI_COUNTOF(_Array) 
  sizeof(__wspiapi_countof_helper(_Array))<BR>#endif<BR>#endif</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>error message: </DIV>
  <DIV>&nbsp;</DIV>
  <DIV>1&gt;------ Build started: Project: smpd_util, Configuration: Debug Win32 
  ------<BR>1&gt;Compiling...<BR>1&gt;smpd_adreg.cpp<BR>1&gt;c:\program 
  files\microsoft visual studio 8\vc\platformsdk\include\wspiapi.h(44) : error 
  C2894: templates cannot be declared to have 'C' linkage<BR>1&gt;Build log was 
  saved at "<A 
  href="file://d:\DEVELOPPEMENTS\MPICH2\Argonne\mpich2-1.0.2p1\mpich2-1.0.2p1\src\pm\smpd\smpd_utilDebug\BuildLog.htm">file://d:\DEVELOPPEMENTS\MPICH2\Argonne\mpich2-1.0.2p1\mpich2-1.0.2p1\src\pm\smpd\smpd_utilDebug\BuildLog.htm</A>"<BR>1&gt;smpd_util 
  - 1 error(s), 0 warning(s)<BR></FONT></DIV></DIV></BLOCKQUOTE></BODY></HTML>