i wrote an inhouse finite element code in Fortran 2003.
Searching for a post-processor i came across GiD and was instantly confinced
after i found out, that a fortran interface to GiDpost is provided as well.
Unfortunately i was stopped by some linking errors and was not able to solve them.
So i am hoping, one of you can help me…
I am using Visual Studio 2012 and the Intel(R) Visual Fortran Compiler 17.0.4.210
To link GiDpost to the code i folloewd these steps:
Add the gidpost.f90 file to the source files of the program
2.1) Link the library path: Linker → General → Additional Library Dependencies → path_to_libraries
2.2) Link the library files: Linker → Input → Additional Dependencies → gidpost.lib zlib.lib hdf5.lib
Create a module output containing the subroutine write_output_file that loads the gidpost module: use gidpost
Try doing what the compiler has suggested:
specify to the linker to ignore one of the repeated definitions
/NODEFAULTLIB: library
to do it in Visual Studio go to the ‘project properties’ window
Linker->Input:
Ignore Specific default Libraries
LIBCMT.lib
and/or
LIBCMTD.lib
(I think that the version with D is because you are compiling a debug version)
try some combinations of libraries to be ignored, depending on the messages of your compiler
You can also compile the gidpost.lib library, the source code is provide (a C/C++ compiler is required off course)
and the zlib source code could be downloaded from Internet (it is open source) and recompiled also if necessary.
about hdf5.lib is also open source and can be downloaded and compiled, but its use is not strictly necessary (if you don’t want use this format), and is possible no to use it (commenting the #define HDF5 in gidpost_config.h)