Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28477 Discussions

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

john8103
Beginner
403 Views
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?
0 Kudos
4 Replies
james1
Beginner
403 Views
Try building your Fortran routine with the /threads switch.

James
0 Kudos
john8103
Beginner
403 Views
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.
0 Kudos
Steven_L_Intel1
Employee
403 Views
Project..Settings..Fortran..Libraries..Reentrancy Support..Threaded. (This is for 6.6 - earlier versions had a checkbox for this.)

Steve
0 Kudos
maskaseb
Beginner
403 Views
Try building your Fortran routine with the /threads switch.

James

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

Thanks
0 Kudos
Reply