|
[Sponsors] |
April 22, 2010, 16:41 |
CGNS lib and Fortran compiler
|
#1 |
New Member
mirage
Join Date: Apr 2010
Posts: 11
Rep Power: 16 |
hello,
I downloaded the CGNS lib and installed it with nmake from Visual C++ 2008. It generate cgnslib_f.h and cgnswin_f.h and libcgns.lib. But when I tried to compile the fortran program which is given under the tests directory from CGNS_LIB files, it generate errors linking: CG_OPEN_F , CG_CLOSE_F etc... I d'ont know what to do to compile my program successfully, and I wonder what s the use of the ADF's ... Can someone tell me how to compile this program? Thank you. |
|
November 28, 2010, 00:08 |
|
#2 |
Member
Join Date: Jun 2009
Posts: 34
Rep Power: 17 |
When I used VC++ 2008 to compile CGNS2.5, it is not successful since the following errors. Could you tell me how to compile it?
Microsoft (R) Program Maintenance Utility Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. cl -nologo -I. -Iadf -FoWIN32\cgns_error.obj -c cgns_error.c cgns_error.c 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. |
|
November 29, 2010, 06:25 |
|
#3 |
Senior Member
Cean
Join Date: Feb 2010
Posts: 128
Rep Power: 16 |
you should read the README file in f2c folder for using FORTRAN.
btw I complied with gcc under win xp, not ms-vc. |
|
Tags |
cgns, fortran |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFX11 + Fortran compiler ? | Mohan | CFX | 20 | March 30, 2011 18:56 |
fortran dll | ollimarc | CFX | 3 | October 19, 2010 14:26 |
CFD ACE+ - Fortran source file compiling on personal (windows 32bit) pc | hiras | Main CFD Forum | 0 | May 8, 2009 12:58 |
FORTRAN static library | littlelz | Main CFD Forum | 6 | April 1, 2003 07:35 |