<!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=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></BODY></HTML>