- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a XP64 program (9.1 FORTRAN and C compilers and VS2005 SP1) that is linking and running correctly.
I need to add capabilty that requires a link against some third party libraries. When I attempt to link (using ifort) I get an unresolved external of GSHandlerCheck. A web article (http://blogs.msdn.com/mgaur/archive/2006/12/21/lnk2019-unresolved-external-symbol-gshandlercheck.aspx) libcmt.lib needs to be included - when I try this the original error stays and I get more errors about double defined variables (free, malloc etc) in libcmt and msvcrt. Any Ideas?
Stuart Connell
Link Copied
- 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 am building from the command .line. My FORTRAN/C compile and link uses -MD option. Are you indicating that the libs were built with a different set of options?
Stuart
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
dumpbin -directives yourlib.lib
and see which library directives are used. If the library code is C code, you must choose the same set of libraries. If it's Fortran code, then you can use linker options to ignore the conflicting libraries.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Note I am using XP64 and building 64 bit exe's. When I try to start dumpbin I get
The procedure entry point __security_error_handler could not be found in MSVCR80.dll
The smae thing works on my 32 bit box. There are numerous (different) versions of this dll on my machine. I think it is getting the one from the SDK area. Do I have a bad dll?
Stuart
- 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 have 2003 Release 2 Platform SDK installed. When I start the command windows I run iclvars.bat followed by ifortvars.bat.These have been modified slightly as recommended by Intel premier support as a result of an earlier issue. The output at the screen is
Intel C++ Compiler 9.1.030 build environment for EM64T-based applications
Copyright (C) 1985-2006 Intel Corporation. All rights reserved.
Targeting Windows Server 2003 X64 RETAIL
'Fortran' is not recognized as an internal or external command,
operable program or batch file.
Intel Fortran Compiler 9.1.029 build environment for EM64T-based applications
Copyright (C) 1985-2006 Intel Corporation. All rights reserved.
The contents of the files are listed below:
iclvars.bat
@echo off
echo.
echo Intel C++ Compiler 9.1.030 build environment for EM64T-based application
s
echo Copyright (C) 1985-2006 Intel Corporation. All rights reserved.
echo.
call "C:Program FilesMicrosoft Platform SDKSetEnv" /X64 /RETAIL
title Intel C++ Compiler 9.1.030 build environment for EM64T-based applicatio
ns
SET ICPP_COMPILER91=C:Program Files (x86)IntelCompilerC++9.1
SET INTEL_LICENSE_FILE=C:Program Files (x86)Common FilesIntelLicenses
Set Path=%ICPP_COMPILER91%EM64TBin;%path%
Set Lib=%ICPP_COMPILER91%EM64TLib;%LIB%
SET Include=%ICPP_COMPILER91%EM64TInclude;%Include%
ifortvars.bat
@echo off
Title Intel C/C++ & Fortran Compiler %s build environment for EM64T-based app
lications
echo.
echo Intel Fortran Compiler 9.1.029 build environment for EM64T-based applica
tions
echo Copyright (C) 1985-2006 Intel Corporation. All rights reserved.
echo.
rem call "C:Program FilesMicrosoft Visual Studio 8VCvcvarsall" x86_amd64
Title Intel Fortran Compiler 9.1.029 build environment for EM64T-based applic
ations
SET IFORT_COMPILER91=C:Program Files (x86)IntelCompilerFortran9.1
SET INTEL_LICENSE_FILE=C:c onnellIntel_compilerLicense
Set Path=%IFORT_COMPILER91%EM64TBin;%path%
Set Lib=%IFORT_COMPILER91%EM64TLib;%LIB%
SET Include=%IFORT_COMPILER91%EM64TInclude;%Include%
if exist "C:Program FilesIntelCompilerFortran9.1EM64TBinimsl.bat" call "
C:Program FilesIntelCompilerFortran9.1EM64TBinimsl.bat"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I forgot to add the value of PATH
NSK1XXES220BXXA> printenv PATH
/cygdrive/c/Program Files/Microsoft Platform SDK/Bin/Win64/x86/AMD64:.:/usr/loca
l/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/Program Files (x86)/Intel/Compile
r/Fortran/9.1/EM64T/Bin:/cygdrive/c/Program Files (x86)/Intel/Compiler/C++/9.1/E
M64T/Bin:/cygdrive/c/Program Files/Microsoft Platform SDK/Bin/Win64/x86/AMD64:/c
ygdrive/c/Program Files/Microsoft Platform SDK/Bin:/cygdrive/c/Program Files/Mic
rosoft Platform SDK/Bin/WinNT:/cygdrive/c/Program Files (x86)/CA/Dcs/DMScripting
/:/cygdrive/c/Program Files (x86)/CA/DCS/CAWIN/:/cygdrive/c/program files (x86)/
imagemagick-6.2.8-q16:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive
/c/WINDOWS/System32/Wbem:/cygdrive/c/Program Files/Intel/DMIX:/cygdrive/c/Progra
m Files (x86)/Microsoft SQL Server/90/Tools/binn/:/cygdrive/c/Program Files (x86
)/Intel/IDB/9.1/EM64T/Script:/cygdrive/c/Program Files (x86)/Intel/Compiler/C++/
9.1/IA32/Bin:/cygdrive/c/Program Files (x86)/Intel/Compiler/C++/9.1/EM64T/Bin:/c
ygdrive/c/Program Files (x86)/Intel/Compiler/C++/9.1/IA32/Bin:/cygdrive/c/Progra
m Files (x86)/Intel/Compiler/C++/9.1/EM64T/Bin:/cygdrive/c/Program Files (x86)/I
ntel/Compiler/Fortran/9.1/IA32/Bin:/cygdrive/c/Program Files (x86)/Intel/Compile
r/Fortran/9.1/EM64T/Bin:/cygdrive/c/Program Files (x86)/Intel/IDB/9.1/EM64T/Scri
pt:/usr/local/grace/bin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Instead of dumpbin, try:
link -dump -directives
The PSDK doesn't have "dumpbin" so you are getting one from somewhere else.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If I use link -dump -directives on the library with references to __GSHandlerCheck hdf5.libI get
Linker Directives
-----------------
/manifestdependency:"type='win32'
name='Microsoft.VC80.CRT'
version='8.0.50727.762'
processorArchitecture='amd64'
publicKeyToken='1fc8b3b9a1e18e3b'"
/DEFAULTLIB:"uuid.lib"
/DEFAULTLIB:"uuid.lib"
/DEFAULTLIB:"MSVCRT"
/DEFAULTLIB:"OLDNAMES"
The same thing on other libs gives different o/p. For example libadio45.lib
Linker Directives
-----------------
-defaultlib:ifconsol
-defaultlib:libifcoremd
-defaultlib:libifportmd
-defaultlib:libmmd
-defaultlib:MSVCRT
-defaultlib:libirc
-defaultlib:OLDNAMES
-defaultlib:ifconsol
-defaultlib:libifcoremd
-defaultlib:libifportmd
-defaultlib:libmmd
-defaultlib:MSVCRT
-defaultlib:libirc
-defaultlib:OLDNAMES
Not sure what this means - any ideas?
Stuart
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is not a Fortran issue.

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