I am a complete novice as far as C++ is concerned, so having great difficulty with interfacing my Fortran and C++ codes:
On the Fortran side:
SUBROUTINE HASHSTRING (str_in, str_in_len, str_out, str_out_len, Status) BIND(C)
USE,INTRINSIC :: ISO_C_BINDING ! Declares C kinds
USE IFWIN, ONLY : DWORD
CHARACTER(KIND=C_CHAR),DIMENSION(*) :: str_in,str_out
INTEGER(C_INT), VALUE, INTENT(IN) :: str_in_len, str_out_len
INTEGER(DWORD), INTENT(INOUT) :: Status
END SUBROUTINE HASHSTRING
On the C++
extern "C" void hashstring (
Everything is working except returning the Status. Even though when in debug mode, this has a value of 0 in the cpp routine, when I get back to Fortran, it has the value it had before the call.
SOLVED it myself -- needed & on the dwStatus argument.