- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a source that I can compile and execute and link using v9.0 using batch files in the 32bit cmd window environment. However, when I try and compile and link from inside an executable I get a strange problem. It tries to set the environment up but it must be missing something. We issue the command "IFORT @INFON.LNK" with all of the compile and link commands in the file INFON.LNK. But the output we get from the compiler is:
Microsoft Incremental Linker Version 8.00.50727.762
Copyright (C) Microsoft Corporation. All rights reserved.
-out:astap.exe
-subsystem:console
-entry:mainCRTStartup
/LIBPATH:C:\PROGRA~1\CULLIM~1\SI72BD~1\lib
C:\PROGRA~1\CULLIM~1\SI72BD~1\lib\proces.lib
C:\PROGRA~1\CULLIM~1\SI72BD~1\lib\utility.lib
C:\PROGRA~1\CULLIM~1\SI72BD~1\lib\tdsubproc.lib
C:\PROGRA~1\CULLIM~1\SI72BD~1\lib\statwin.lib
C:\PROGRA~1\CULLIM~1\SI72BD~1\lib\sfmatlab.lib
C:\PROGRA~1\CULLIM~1\SI72BD~1\lib\isight.lib
/STACK:1000000000
/MAP
/NODEFAULTLIB:msvcrt.lib
/NODEFAULTLIB:dfordll.lib
/NODEFAULTLIB:msvcrtd.lib
/NODEFAULTLIB:dfor.lib
astap.obj
libifcorert.lib(libifcoremain.obj) : warning LNK4217: locally defined symbol __controlfp imported in function _testFPIEEE_RECORD
Intel Fortran Compiler for 32-bit applications, Version 9.0 Build 20060222Z Package ID: W_FC_C_9.0.030
Copyright (C) 1985-2006 Intel Corporation. All rights reserved.
ifort -Qvc8 "-Qlocation,link,C:\Program Files\Microsoft Visual Studio 8\VC\Bin" astap.for /fpe:0 /names:lowercase /iface:cref /module:C:\PROGRA~1\CULLIM~1\SI72BD~1\lib /MT /libs:dll /iface:mixed_str_len_arg /include:C:\PROGRA~1\CULLIM~1\SI72BD~1\lib /assume:byterecl /extend_source:132 /O3 /list /traceback /INCREMENTAL:NO
The bad part I think is that it adds "-Qvc8" in the stream since I also have VS2005 installed. The linker doesn't issue any error messages. But the executable stops running when it gets to a call statstart which comes from our STATWIN.DLL. If I look in the map file there, is no listing for _statstart. While in the map from the execution in the cmd window it appears. There is an entry in both map files for __imp__statstart. So I don't understand why the linker doesn't give an error and seems to fail to find this routine in the DLL.
I'm not sure how to best fix this issue. It seems we don't want -Qvc8, but just adding -Qvc7.1 to the compile and link file gets a warning that it is overridding -Qvc8 with -Qvc7.1, but doesn't change the resulting executable. And it still doesn't run.
Thanks for any help.
Dave
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The -Qvc8 is not relevant. You are using the VS2005 linker. The only thing that this changes is the choice of MSVC libraries being used. If you want to use VS2003 instead, edit ifortvars.bat in the compiler "bin" folder to change the VS version that is used and edit ifort.cfg (same place) to specify -Qvc7.1 instead of -Qvc8.
The __imp_ symbol is correct for a DLL import library.
What, exactly and completely, is the error message?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My recollection is that 9.0 did not support VS2005. I'm not sure how you ended up with that combination. But the linking is working fine so I would not waste time on that path.
The program hanging is not going to be a VS2005 vs. VS2003 issue, but if you want to test that, you'll either need to edit the files as I mentioned or reinstall 9.0 and specify that it should integrate with VS2003 (it asks.)
I would suggest some debugging is in order.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I guess the linker misbehaves with a stack reserve size close to 1GB. Glad to hear you solved it. May I suggest using /heap-arrays or ALLOCATABLE local arrays so that you don't need such a large stack?

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page