CGNS Compiling
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. |
CGNS under widows
Hello,
I saw your post, and I wondered if you succeeded in installing CGNS lib and compiling a fortran program. Thank you |
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 |
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? |
Are you sure your C++ and Fortran compiler are compatible ? What version of Microsoft VS you use ?
Do |
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 |
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 |
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 |
I do have Cygwin, so I have to download a package for Cygwin which contains a Fortran compiler?
Thanks for all your replies. Manal |
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 |
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 |
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 |
COMPAQ VISUAL FORTRAN 6.6 is compatible with Visual Studio 6, I don't think will work with VS 2008 Express Edition.
Do |
Hi manaliac,
It seems that I have the same problem as you, have you succeed to run CGNS? |
CGNS installation
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 |
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 :) |
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 |
Quote:
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 |
All times are GMT -4. The time now is 08:58. |