I have read this question: How do you USE Fortran 90 module data But I could not solve my problem.
I get error LNK2019: unresolved external symbol when I try to use a variable which is declared in another module.
For background information: I am a beginner in Fortran and am working in a project someone else has created. I am using an Intel fortran composer and visual studio. I do not know for sure if I understand the use of public and private module data properly.
The problem is whenever I try to use the variable BodySystem in another module, it doesn't work and I get the error that there is an unresolved external symbol.
Am I using the public and private parts incorrect or am I missing something else?
Edit: I changed the code into a compilable snippet
Edit2: Deleted the code, since that was not the problem. IanH gave me the right answer as the object file was out of date.
The exact error message I get is:
Error 2 fatal error LNK1120: 1 unresolved externals Debug\HmSlam.exe
Error 1 error LNK2019: unresolved external symbol _COORDINATESSYSTEM_M_mp_BODYSYSTEM referenced in function _MAIN__ HmSlam.obj
where HmSlam is the main program and coordinatessystem_m is the module where the variable bodysystem is declared.