[Insight-users] using vcf2c.lib

Jeffrey Duda Jeffrey Duda" <jtduda@seas.upenn.edu
Tue, 2 Apr 2002 09:57:28 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_0019_01C1DA2C.CC584E40
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

I've been trying to write some itk classes that make use of fortran code =
converted via f2c.  This requires linking to the f2c library.  Under =
unix this does not seem to be a problem, however under windows i run =
into the linking errors shown below.  If anyone has any experience or =
ideas regarding this I would greatly appreciate the help.  Thanks.

Jeffrey Duda


[vcf2c.lib included]
--------------------Configuration: FEMOutside - Win32 =
Debug--------------------
Compiling...
itkFEMLinearSystemWrapperItpack.cxx
Linking...
LIBC.lib(crt0dat.obj) : error LNK2005: _exit already defined in =
MSVCRTD.lib(MSVCRTD.dll)
LIBC.lib(crt0dat.obj) : error LNK2005: __exit already defined in =
MSVCRTD.lib(MSVCRTD.dll)
LIBC.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in =
MSVCRTD.lib(cinitexe.obj)
LIBC.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in =
MSVCRTD.lib(cinitexe.obj)
LIBC.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in =
MSVCRTD.lib(cinitexe.obj)
LIBC.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in =
MSVCRTD.lib(cinitexe.obj)
LIBC.lib(crt0.obj) : error LNK2005: _mainCRTStartup already defined in =
MSVCRTD.lib(crtexe.obj)
LIBC.lib(strcat.obj) : error LNK2005: _strcpy already defined in =
MSVCRTD.lib(MSVCRTD.dll)
LINK : warning LNK4098: defaultlib "MSVCRTD" conflicts with use of other =
libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other =
libs; use /NODEFAULTLIB:library
U:/jtduda/src/itk/Insight-VC/bin/Debug/FEMOutside.exe : fatal error =
LNK1169: one or more multiply defined symbols found
Error executing link.exe.

[vcf2c.lib excluded]
--------------------Configuration: FEMOutside - Win32 =
Debug--------------------
Linking...
dsrc2c.obj : error LNK2001: unresolved external symbol _do_fio
dsrc2c.obj : error LNK2001: unresolved external symbol _e_wsfe
dsrc2c.obj : error LNK2001: unresolved external symbol _s_wsfe
dsrc2c.obj : error LNK2001: unresolved external symbol _pow_dd
dsrc2c.obj : error LNK2001: unresolved external symbol _i_sign
dsrc2c.obj : error LNK2001: unresolved external symbol _etime_
U:/jtduda/src/itk/Insight-VC/bin/Debug/FEMOutside.exe : fatal error =
LNK1120: 6 unresolved externals
Error executing link.exe.

ALL_BUILD - 7 error(s), 0 warning(s)

------=_NextPart_000_0019_01C1DA2C.CC584E40
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I've been trying to write some itk =
classes that=20
make use of fortran code converted via f2c.&nbsp; This requires linking =
to the=20
f2c library.&nbsp; Under unix this does not seem to be a problem, =
however under=20
windows i run into&nbsp;the linking&nbsp;errors shown below.&nbsp; If =
anyone has=20
any experience or ideas&nbsp;regarding this I would greatly appreciate =
the=20
help.&nbsp; Thanks.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Jeffrey Duda</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>[vcf2c.lib included]</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>--------------------Configuration: =
FEMOutside -=20
Win32=20
Debug--------------------<BR>Compiling...<BR>itkFEMLinearSystemWrapperItp=
ack.cxx<BR>Linking...<BR>LIBC.lib(crt0dat.obj)=20
: error LNK2005: _exit already defined in=20
MSVCRTD.lib(MSVCRTD.dll)<BR>LIBC.lib(crt0dat.obj) : error LNK2005: =
__exit=20
already defined in MSVCRTD.lib(MSVCRTD.dll)<BR>LIBC.lib(crt0init.obj) : =
error=20
LNK2005: ___xc_z already defined in=20
MSVCRTD.lib(cinitexe.obj)<BR>LIBC.lib(crt0init.obj) : error LNK2005: =
___xc_a=20
already defined in MSVCRTD.lib(cinitexe.obj)<BR>LIBC.lib(crt0init.obj) : =
error=20
LNK2005: ___xi_z already defined in=20
MSVCRTD.lib(cinitexe.obj)<BR>LIBC.lib(crt0init.obj) : error LNK2005: =
___xi_a=20
already defined in MSVCRTD.lib(cinitexe.obj)<BR>LIBC.lib(crt0.obj) : =
error=20
LNK2005: _mainCRTStartup already defined in=20
MSVCRTD.lib(crtexe.obj)<BR>LIBC.lib(strcat.obj) : error LNK2005: _strcpy =
already=20
defined in MSVCRTD.lib(MSVCRTD.dll)<BR>LINK : warning LNK4098: =
defaultlib=20
"MSVCRTD" conflicts with use of other libs; use =
/NODEFAULTLIB:library<BR>LINK :=20
warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use =

/NODEFAULTLIB:library<BR>U:/jtduda/src/itk/Insight-VC/bin/Debug/FEMOutsid=
e.exe :=20
fatal error LNK1169: one or more multiply defined symbols found<BR>Error =

executing link.exe.<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>[vcf2c.lib excluded]</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>--------------------Configuration: =
FEMOutside -=20
Win32 Debug--------------------<BR>Linking...<BR>dsrc2c.obj : error =
LNK2001:=20
unresolved external symbol _do_fio<BR>dsrc2c.obj : error LNK2001: =
unresolved=20
external symbol _e_wsfe<BR>dsrc2c.obj : error LNK2001: unresolved =
external=20
symbol _s_wsfe<BR>dsrc2c.obj : error LNK2001: unresolved external symbol =

_pow_dd<BR>dsrc2c.obj : error LNK2001: unresolved external symbol=20
_i_sign<BR>dsrc2c.obj : error LNK2001: unresolved external symbol=20
_etime_<BR>U:/jtduda/src/itk/Insight-VC/bin/Debug/FEMOutside.exe : fatal =
error=20
LNK1120: 6 unresolved externals<BR>Error executing =
link.exe.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>ALL_BUILD - 7 error(s), 0=20
warning(s)</DIV></FONT></BODY></HTML>

------=_NextPart_000_0019_01C1DA2C.CC584E40--