<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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 mpich2.1.0.4p1 version).</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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> * Add smpd_job.c to the project
</FONT></DIV>
<DIV><FONT face=Arial size=2> * add MPICH_IGNORE_CXX_SEEK
compilation directive</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>In 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> </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> * activeds.lib and
netapi32.lib</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Then mpiexec compiles and link and there
remains undefined symbols related to activeDir stuff. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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> </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> 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++ header files 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> One such C++ header file is <wspiapi.h>. 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 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> 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> 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> </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> Jayesh
Krishna<BR> Argonne National Laboratory<BR> Mathematics and Computer
Science<BR> Email:
jayesh@mcs.anl.gov<BR>----------------------------------</FONT> </P>
<DIV> </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> </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> </DIV>
<DIV><FONT face=Arial size=2>Any suggestions on what's going wrong
?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thank you,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Andres</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>in wsiapi.h</FONT></DIV>
<DIV> </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 <typename __CountofType, size_t
_N><BR>char (&__wspiapi_countof_helper(__CountofType
(&_Array)[_N]))[_N];<BR>#define _WSPIAPI_COUNTOF(_Array)
sizeof(__wspiapi_countof_helper(_Array))<BR>#endif<BR>#endif</DIV>
<DIV> </DIV>
<DIV>error message: </DIV>
<DIV> </DIV>
<DIV>1>------ Build started: Project: smpd_util, Configuration: Debug Win32
------<BR>1>Compiling...<BR>1>smpd_adreg.cpp<BR>1>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>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>smpd_util
- 1 error(s), 0 warning(s)<BR></FONT></DIV></DIV></BLOCKQUOTE></BODY></HTML>