- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 TDIuse 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.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
![](/skins/images/045A6C88D0527A93E76B179D7F5E2AFE/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page