Error 6404 when running fortran code in visual studio

In summary, the error message says that there is a problem with the line highlighted in the screen shot. The programmer does not know what the problem is so any help would be much appreciated.
  • #1
snow.ball
2
0
I am trying to compile several libraries of FORTRAN code and getting the error message as can be seen in the screen shot. As I do not have any experience with FORTRAN I am not sure what is wrong in the line highlighted line. Any help would be greatly appreciated! Thanks a lot! :-)
upload_2014-11-18_13-11-7.png
 
Technology news on Phys.org
  • #3
getcwd (get current working directory) is an intrinsic subroutine, but you have invoked it as if it were a function that returns a value. This is how it should be called:
Code:
getcwd(DirName)
 
  • #4
The docs for getcwd() indicate that it can return a status but that you have to decide which style of invocation to use.
 
  • #5
jedishrfu said:
The docs for getcwd() indicate that it can return a status but that you have to decide which style of invocation to use.
Aha! I saw the example on a doc page and didn't notice that getcwd could also be used as a function. Thanks for the correction.
 
  • #6
hhhmmm...just tried a short program and it worked just fine.

Which compiler are you using? Maybe your compiler does not quite like that call?

Maybe your compiler thinks that what you have is some kind of array, instead of a function call.


I would switch and try the "subroutine" style call instead: " call GETCWD(DirName, Status) ".
 
  • #7
just found a source where they prototype getcwd even though is an intrinsic...maybe due to the fact that can be called either way?

Go ahead and prototype it at the beginning of the subroutine: "integer*4 :: getcwd" ...you should probably also make sure that status is of the same type or larger.
 
  • #8
hey guys. sorry just replying now and thank's so much for the suggestions! I will try them all out! btw using visual studio with IVF...
 

1. What is Error 6404 when running fortran code in visual studio?

Error 6404 is a commonly occurring error when trying to compile or run fortran code in Visual Studio. It is usually caused by a missing or incorrect library or file path in the project settings.

2. How do I fix Error 6404 when running fortran code in visual studio?

To fix Error 6404, you will need to check the project settings and make sure all necessary libraries and file paths are included. You may also need to update your compiler or make sure it is compatible with your version of Visual Studio.

3. Can a coding error cause Error 6404 when running fortran code in visual studio?

Yes, a coding error can also cause Error 6404. Make sure to thoroughly check your code for any syntax or logic errors that may be causing the issue.

4. Are there any common mistakes that can lead to Error 6404 when running fortran code in visual studio?

Yes, some common mistakes include not including the correct libraries or file paths in the project settings, using an incompatible compiler, or having a coding error in the code.

5. Is there any support available for fixing Error 6404 when running fortran code in visual studio?

Yes, there are many online forums and communities where you can ask for help with fixing Error 6404. You can also reach out to the support team for your compiler or Visual Studio for assistance.

Similar threads

  • Programming and Computer Science
Replies
16
Views
1K
  • Programming and Computer Science
Replies
1
Views
256
  • Programming and Computer Science
Replies
2
Views
304
  • Programming and Computer Science
Replies
3
Views
4K
  • Programming and Computer Science
Replies
17
Views
4K
  • Programming and Computer Science
Replies
2
Views
1K
  • Programming and Computer Science
Replies
8
Views
3K
  • Programming and Computer Science
2
Replies
57
Views
3K
  • Programming and Computer Science
Replies
6
Views
2K
  • Programming and Computer Science
Replies
8
Views
1K
Back
Top