CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   How to install CGNS under windows xp? (http://www.cfd-online.com/Forums/main/82486-how-install-cgns-under-windows-xp.html)

lzgwhy November 27, 2010 23:02

How to install CGNS under windows xp?
 
Hello. I tried to install CGNS 2.5 under windows xp following the steps suggested by CGNS file README, but it was not successful since some errors always occurred as followed when I run "nmake". How can I fix the problem? Thanks.
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(107) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(107) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(107) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(108) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(108) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(108) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(109) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(109) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(109) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(110) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(110) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(110) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(110) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(110) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(110) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(112) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(112) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(112) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(112) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(112) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(112) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(113) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(113) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(113) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(116) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(116) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(116) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(117) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(117) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(117) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(118) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(118) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(118) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(119) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(119) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(119) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(120) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(120) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(120) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(120) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(120) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(120) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(121) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(121) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(121) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(122) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(122) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(122) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(123) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(123) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(123) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(123) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(123) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(123) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(124) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(124) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(124) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(125) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(125) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(125) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(126) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(126) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(126) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(127) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(127) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(127) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(128) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(128) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(128) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(135) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(135) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(135) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(136) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(136) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(136) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(137) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(137) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(137) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(138) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(138) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(138) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(138) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(138) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(138) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(139) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(139) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(139) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(139) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(139) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(139) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(140) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(140) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(140) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(141) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(141) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(141) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(142) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(142) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(142) : error C3304: 'PreAttribute': attribute does not allow unnamed arguments
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(143) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(143) : error C2057: expected constant expression
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(143) : fatal error C1003: error count exceeds 100; stopping compilation
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.EXE"' : return code '0x2'
Stop.

mulligan January 11, 2011 19:44

I've got the solution to your problem from CGNS Mailing list.
---------------------------------------

An HTML attachment was scrubbed...
URL: https://lists.nasa.gov/mailman/priva...f/BuildLog.htm
From xjiao@sunysb.edu Thu Jan 15 14:13:30 2009
From: xjiao@sunysb.edu (Xiangmin Jiao)
Date: Tue Sep 15 19:17:33 2009
Subject: [CGNStalk] CGNS library compilation using MS Visual Studio
In-Reply-To: <ADFE412874690C4089B6FAC628F9655C05D8EAC4@UKDEWEB0 05.uk.rolls-royce.com>
References: <ADFE412874690C4089B6FAC628F9655C05D8EAC4@UKDEWEB0 05.uk.rolls-royce.com>
Message-ID: <DA77FA11-7CC4-46CE-8B9A-425B5796E3AB@sunysb.edu>

Yon Han,

I suppose you were trying to compile v2.5 with MS Visual Studio 2008.
I had the same problem. The error was because some symbols in
cgnslib.h conflict with some VC's headers. You need only to change
line 77 of cgnslib.h to

#if 0 && CGNS_VERSION < 3000

This would disable the following macros that do not start with CG_:

#define MODE_READ CG_MODE_READ
#define MODE_WRITE CG_MODE_WRITE
#define MODE_CLOSED CG_MODE_CLOSED
#define MODE_MODIFY CG_MODE_MODIFY
#define Null CG_Null
#define UserDefined CG_UserDefined
#define Celcius Celsius

Now you will need to make sure your own code would use the macros that
start with CG_.

-Jim


All times are GMT -4. The time now is 08:48.