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

Problems with IFPORT

cordes
Beginner
367 Views
I am porting a large project that consists of FORTRAN and C++ code from Visual Studio 6.0 to Visual Studio .NET.
We're using Visual Studio .NET 2003 and Intel FORTRAN 9.0.
I keep getting the error
error LNK2019: unresolved external symbol_SLEEPQQ referenced in funcion_TDI
In one of the FORTRAN files we have a subroutine that uses theSLEEPQQ function. The subroutine starts with :
SUBROUTINE TDI

use IFPORT. only : SLEEPQQ

IMPICIT NONE

...
then in one of the C++ .h files we have many FORTRAN variables and subroutines declared as globals for use in the C++ code. Example:
extern "c" void_stdcall TDI();
in a different C++ file we call the TDI function with thefollowing statement:
fortranItem::TDI();

I have added the include directory which contains the ifport.f90 file to the Tools>Options>Projects>C++ Directories listing and in the Project>ccswin32 properties>C++>General>Additional Include Directories listing.
I'm fairly new a working with combined C++ and FORTRAN codesoWhat am I missing here?Whyis thelinker notrecognizing the SLEEPQQ command.I had the same trouble witha couple instancesof GETTIMand fixed itby replacing GETTIM with DATE_AND_TIME.






0 Kudos
1 Reply
Steven_L_Intel1
Employee
367 Views
I gather that this is a C++ main program that calls Fortran routines, and this was converted to a solution with two projects, one being a Fortran static library?

1. Make sure that in Tools..Options..Projects..VC++ Directories that the path to the Intel Fortran LIB folder is included. It probably is.
2. In the Fortran project, set the property Fortran..Libraries..Disable default library search rules to "No".

Rebuild.
0 Kudos
Reply