altering the call from Fortran caused a crash (but I do feel I have been educated so thanks for that anyway, always good to be learning!!) I think because I'm using PS4, so it should have been !M$ATTRIBUTES as xwb suggests
but anyway, I went back and tried putting the pointers in the C code...
I'm editing a model written in C and fortran- I've worked out how to use fortran variables in C, but not the reverse- any advice on what I'm doing wrong, or links to info on how to do this greatly appreciated- I don't even know the basics, like should I be using pointers (it seems to fall over...
I suspect missing bits of library files may be causing my _getstdfilesx error
I do have
// Std handle defns
#define stdin _getstdfilex(0)
#define stdout _getstdfilex(1)
#define stderr _getstdfilex(2)
// functions for general buffered file handling in either ANSI or Wide
_CRTIMP FILE*...
Thanks salgerman,
xwb;
I am trying to call C from fortran, in a DLL
I have managed to fix the unresolved external symbol errors for the c references (I had not told the compiler to link to the correct files, doh!) but am having problems now with some other unresolved externals
__getstdfilex...
I am trying a test build of some old code (hence the old compiler). I need to link C and F files, but I am getting the following error
error LNK2001: unresolved external symbol _flow
for each mention of a C file in the F code. Below is an example of how the f files link to the C files...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.