CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

CGNS Compiling

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 28, 2006, 15:56
Default CGNS Compiling
  #1
Diego
Guest
 
Posts: n/a
Hi everyone!

I just recently downloaded CGNS ver 2.4, I tried to compile it using VS 2005 C++ Express, but it was unsuccessful, then I tried to compile it using MinGW with the MSYS interface, but I get the following error when I use the compiled library in one of my FORTRAN code: "no a valid reference cg_open_f_". The CGNS have a test case to prove your FORTRAN compiler, but although the test as sucessful, I still get the same error when I tried to compile my code, please can anyone tell me how to compile CGNS library in WinXP and how to use it in a Lahey Fortran 95 compiler.
  Reply With Quote

Old   April 23, 2010, 05:29
Default CGNS under widows
  #2
New Member
 
mirage
Join Date: Apr 2010
Posts: 11
Rep Power: 15
manaliac is on a distinguished road
Hello,
I saw your post, and I wondered if you succeeded in installing CGNS lib and compiling a fortran program.

Thank you
manaliac is offline   Reply With Quote

Old   April 23, 2010, 09:56
Default
  #3
Senior Member
 
Join Date: Nov 2009
Posts: 411
Rep Power: 19
DoHander is on a distinguished road
In order to successfully compile CGNS you will need an ANSI C compiler (Visual Studio 2003,2005,2008 are not ANSI C conformal) if you use Linux, Windows or Mac you can use the gcc compiler to compile CGNS.

Do
DoHander is offline   Reply With Quote

Old   April 23, 2010, 10:15
Default
  #4
New Member
 
mirage
Join Date: Apr 2010
Posts: 11
Rep Power: 15
manaliac is on a distinguished road
Hello,
I succeeded in building the cgns lib with MS Visual C++ ( nmake), but when I tried to compile a fortran program given with the test files, I failed.

It seemed like the libcgns.lib contains a lot of errors or something like that, because when I compile under Fortran Power Station 4.0 I received a bunch of errors (these errors are generated in case I added libcgns.lib as file into the projet (as library file) :
Linking...
LINK : warning LNK4098: defaultlib "LIBCMT" conflicts with use of other libs; use /NODEFAULTLIB:library
cgwrite.obj : error LNK2001: unresolved external symbol _CG_ARRAY_WRITE_F@28
libcgns.lib(cgns_io.obj) : error LNK2001: unresolved external symbol ___security_cookie
libcgns.lib(ADF_interface.obj) : error LNK2001: unresolved external symbol ___security_cookie
libcgns.lib(ADF_internals.obj) : error LNK2001: unresolved external symbol ___security_cookie
libcgns.lib(cg_ftoc.obj) : error LNK2001: unresolved external symbol ___security_cookie
libcgns.lib(cgnslib.obj) : error LNK2001: unresolved external symbol ___security_cookie
libcgns.lib(cgns_internals.obj) : error LNK2001: unresolved external symbol ___security_cookie
libcgns.lib(cgns_error.obj) : error LNK2001: unresolved external symbol ___security_cookie
libcgns.lib(cgns_io.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
libcgns.lib(ADF_interface.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
libcgns.lib(ADF_internals.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
libcgns.lib(cg_ftoc.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
libcgns.lib(cgnslib.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
libcgns.lib(cgns_internals.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
libcgns.lib(cgns_error.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
libcgns.lib(cgnslib.obj) : error LNK2001: unresolved external symbol __ftol2_sse
libcgns.lib(cgns_error.obj) : error LNK2001: unresolved external symbol ___iob_func
libcgns.lib(cgns_io.obj) : error LNK2001: unresolved external symbol ___iob_func
libcgns.lib(ADF_interface.obj) : error LNK2001: unresolved external symbol ___iob_func
libcgns.lib(ADF_internals.obj) : error LNK2001: unresolved external symbol ___iob_func
libcgns.lib(cgns_io.obj) : error LNK2001: unresolved external symbol __stat64i32
libcgns.lib(ADF_internals.obj) : error LNK2001: unresolved external symbol __ctime64
libcgns.lib(ADF_internals.obj) : error LNK2001: unresolved external symbol __time64
cgwrite.exe : fatal error LNK1120: 8 unresolved externals
Error executing link.exe.
cgwrite.exe - 24 error(s), 28 warning(s).

So I didn't know anymore if the errors are in the CGNS lib or not.
When I didnt add that library, I had :
--------------------Configuration: cgwrite - Win32 Debug--------------------
Linking...
cgwrite.obj : error LNK2001: unresolved external symbol _CG_CLOSE_F@8
cgwrite.obj : error LNK2001: unresolved external symbol _CG_DATACLASS_WRITE_F@8
cgwrite.obj : error LNK2001: unresolved external symbol _CG_BCDATA_WRITE_F@28
cgwrite.obj : error LNK2001: unresolved external symbol _CG_DATASET_WRITE_F@36
cgwrite.obj : error LNK2001: unresolved external symbol _CG_GRIDLOCATION_WRITE_F@8
cgwrite.obj : error LNK2001: unresolved external symbol _CG_BOCO_NORMAL_WRITE_F@36
cgwrite.obj : error LNK2001: unresolved external symbol _CG_BOCO_WRITE_F@44
cgwrite.obj : error LNK2001: unresolved external symbol _CG_DESCRIPTOR_WRITE_F@20
cgwrite.obj : error LNK2001: unresolved external symbol _CG_1TO1_WRITE_F@48
cgwrite.obj : error LNK2001: unresolved external symbol _CG_CONN_WRITE_F@76
cgwrite.obj : error LNK2001: unresolved external symbol _CG_HOLE_WRITE_F@48
cgwrite.obj : error LNK2001: unresolved external symbol _CG_UNITS_WRITE_F@24
cgwrite.obj : error LNK2001: unresolved external symbol _CG_ARRAY_WRITE_F@28
cgwrite.obj : error LNK2001: unresolved external symbol _cg_goto_f
cgwrite.obj : error LNK2001: unresolved external symbol _CG_DISCRETE_WRITE_F@28
cgwrite.obj : error LNK2001: unresolved external symbol _CG_FIELD_WRITE_F@40
cgwrite.obj : error LNK2001: unresolved external symbol _CG_SOL_WRITE_F@32
cgwrite.obj : error LNK2001: unresolved external symbol _CG_COORD_WRITE_F@36
cgwrite.obj : error LNK2001: unresolved external symbol _CG_ZONE_WRITE_F@32
cgwrite.obj : error LNK2001: unresolved external symbol _CG_BASE_WRITE_F@28
cgwrite.obj : error LNK2001: unresolved external symbol _CG_ERROR_EXIT_F@0
cgwrite.obj : error LNK2001: unresolved external symbol _CG_OPEN_F@20
cgwrite.exe : fatal error LNK1120: 22 unresolved externals
Error executing link.exe.
cgwrite.exe - 23 error(s), 0 warning(s)


So do you have an idea why I have these errors?
manaliac is offline   Reply With Quote

Old   April 23, 2010, 19:51
Default
  #5
Senior Member
 
Join Date: Nov 2009
Posts: 411
Rep Power: 19
DoHander is on a distinguished road
Are you sure your C++ and Fortran compiler are compatible ? What version of Microsoft VS you use ?

Do
DoHander is offline   Reply With Quote

Old   April 24, 2010, 17:51
Default
  #6
New Member
 
mirage
Join Date: Apr 2010
Posts: 11
Rep Power: 15
manaliac is on a distinguished road
I'm using MS Visual C++ 2008, and for the fortran it's Fortran Power Station 4.0.

What do you think about it? Are they incompatible?

Thanks

Manal
manaliac is offline   Reply With Quote

Old   April 24, 2010, 20:20
Default
  #7
Senior Member
 
Join Date: Nov 2009
Posts: 411
Rep Power: 19
DoHander is on a distinguished road
I'm almost certain they are totally incompatible !!! Fortran Power Station 4.0 is a very old Fortran 77 compiler.

Compatible compilers (after my knowledge):

1. Visual Studio 6.0 and Compaq Visual Fortran (commercial, obsolete compilers)
2. Intel Visual Fortran and Intel C++ (commercial)
3. gfortran and gcc (free)

Do
DoHander is offline   Reply With Quote

Old   April 24, 2010, 20:22
Default
  #8
Senior Member
 
Join Date: Nov 2009
Posts: 411
Rep Power: 19
DoHander is on a distinguished road
I suppose you can use Cygwin to compile all libCGNS and your Fortran programs (you will have for free all the tools you need to do your projects).

Do
DoHander is offline   Reply With Quote

Old   April 25, 2010, 10:03
Default
  #9
New Member
 
mirage
Join Date: Apr 2010
Posts: 11
Rep Power: 15
manaliac is on a distinguished road
I do have Cygwin, so I have to download a package for Cygwin which contains a Fortran compiler?

Thanks for all your replies.

Manal
manaliac is offline   Reply With Quote

Old   April 25, 2010, 11:06
Default
  #10
Senior Member
 
Join Date: Nov 2009
Posts: 411
Rep Power: 19
DoHander is on a distinguished road
If you have Cygwin installed just double click on Setup.exe (or something similar from which you have initially install Cygwin) and be sure gfortran (this is the Fortran compiler) and gcc (the C compiler) are selected for installation.

You can search Google for "cygwin gfortran installation" or "cygwin gcc installation" if my above instructions looks obscure .

Do
DoHander is offline   Reply With Quote

Old   April 25, 2010, 11:46
Default
  #11
New Member
 
mirage
Join Date: Apr 2010
Posts: 11
Rep Power: 15
manaliac is on a distinguished road
Thank you for your advice! I've got Cygwin a week ago, and I downloaded all the important packages (gcc, make, emacs) minus the gfortran! But I will try tomorrow at work to do it! And I let you know if I succeed or not!

Have a good day!

Manal
manaliac is offline   Reply With Quote

Old   April 26, 2010, 05:20
Default
  #12
New Member
 
mirage
Join Date: Apr 2010
Posts: 11
Rep Power: 15
manaliac is on a distinguished road
I've got the COMPAQ VISUAL FORTRAN 6.6, do you think it's a compatible version with the Visual C++ 2008 express??

Thanks

MAnal
manaliac is offline   Reply With Quote

Old   April 26, 2010, 15:51
Default
  #13
Senior Member
 
Join Date: Nov 2009
Posts: 411
Rep Power: 19
DoHander is on a distinguished road
COMPAQ VISUAL FORTRAN 6.6 is compatible with Visual Studio 6, I don't think will work with VS 2008 Express Edition.

Do
DoHander is offline   Reply With Quote

Old   June 22, 2010, 12:05
Default
  #14
New Member
 
Mimou
Join Date: Jun 2010
Posts: 2
Rep Power: 0
Mimou is on a distinguished road
Hi manaliac,
It seems that I have the same problem as you, have you succeed to run CGNS?
Mimou is offline   Reply With Quote

Old   July 29, 2010, 05:58
Default CGNS installation
  #15
New Member
 
Join Date: May 2010
Posts: 7
Rep Power: 15
Deevyendu is on a distinguished road
hi i downloaded CGNS sof
tware but not getting how to install it ...can any one tel how to compile ... cgns with help of ansi c or gcc ? i had downloaded but not getting how to complie or how to see the files
Deevyendu is offline   Reply With Quote

Old   November 4, 2010, 05:14
Default
  #16
Member
 
Hamza Motiwala
Join Date: Nov 2010
Posts: 41
Rep Power: 15
hamzamotiwala is on a distinguished road
Hello,

I am new to this forum. Since the discussion was about CGNS, I thought of making a relevant request .I am looking for a working sample C program that can read and write data from an unstructured grid file in CGNS Format. Can anyone help me out with this problem please. Will really appreciate the help.

Thanks
hamzamotiwala is offline   Reply With Quote

Old   November 6, 2010, 04:50
Default
  #17
Senior Member
 
Cean
Join Date: Feb 2010
Posts: 128
Rep Power: 16
shirazbj is on a distinguished road
Hi,

I use gcc 4.5.1 from Equation Solution ( http://www.equation.com/servlet/equation.cmd?call=fortran )

complied libcgns.lib from source under win xp.

Then tried the write_test.c example under the \tests folder. I got a test.cgns file, it looks all good in VisIt2.1

Have fun.

Cean
shirazbj is offline   Reply With Quote

Old   December 21, 2014, 02:40
Default
  #18
New Member
 
Alex Chen
Join Date: Dec 2014
Posts: 2
Rep Power: 0
chen04 is on a distinguished road
Quote:
Originally Posted by Diego
;44953
Hi everyone!

I just recently downloaded CGNS ver 2.4, I tried to compile it using VS 2005 C++ Express, but it was unsuccessful, then I tried to compile it using MinGW with the MSYS interface, but I get the following error when I use the compiled library in one of my FORTRAN code: "no a valid reference cg_open_f_". The CGNS have a test case to prove your FORTRAN compiler, but although the test as sucessful, I still get the same error when I tried to compile my code, please can anyone tell me how to compile CGNS library in WinXP and how to use it in a Lahey Fortran 95 compiler.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!
Dear Diego
I recently also try to install CGNS on my playform, I tried to compile it using VS2010 and interfortran 2011, and it was unsucessful, when I use nmake install it warns me can not find %\cgns_3.2.1\src\lib\cngs.lib. I wonder have you ever meet this error. If so can you tell me how to correct it, If not can you tell me how to install cgsn and which complier should I use.Thank you very much!
Chen
chen04 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[CGNS] CGNS converters available mbeaudoin OpenFOAM Meshing & Mesh Conversion 137 December 14, 2018 05:20
CGNS unsteady dilemna smitha Main CFD Forum 0 February 16, 2011 10:13
Help with KIVA4 source code compiling geothokar Main CFD Forum 0 September 3, 2010 06:40
CGNS compiling on winxp zonexo Main CFD Forum 1 March 5, 2006 09:15
CGNS libraries, compiling and linking... Ironman80 Main CFD Forum 2 February 14, 2006 23:36


All times are GMT -4. The time now is 02:32.