Using Fortran code with an MFC AppWizard(exe), in Visual C 6

Using Fortran code with an MFC AppWizard(exe), in Visual C 6

I am using Visual C 6. I made a Dialog based project by choosing MFC AppWizard(exe). I added some simple fortan subroutine in there, and declared it in my main C file (test1.cpp) with

extern "C" {
void __stdcall FORTEST(void);
}

and called it with

FORTEST();

And I came up with all of these linking errors, with various commands, like "_exit", already defined ( I attached an MS Word file of the error list). So it must have conflicting Fortran and C libraries I assume.
In the past, when I created an empty Win32 Console Application, I was able to call fortran subroutines without a problem, but now that I'm trying to do the MFC AppWizard thing, it doesn't work.
Can someone please help me figure this out?

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Try building your Fortran routine with the /threads switch.

James

How do I go about building with the /thread switch?
I normally just hit the build button, I don't know how to do it from a command line as it sounds like you are describing.

Project..Settings..Fortran..Libraries..Reentrancy Support..Threaded. (This is for 6.6 - earlier versions had a checkbox for this.)

Steve

Retired 12/31/2016

Quoting - james@elementyl.com
Try building your Fortran routine with the /threads switch.

James

john8103, I have the same problem. How can I contact you?

Thanks

Leave a Comment

Please sign in to add a comment. Not a member? Join today