Search
Close this search box.
Notifications
Clear all

How to include libraries in an Abaqus subroutine??

2 Posts
2 Users
0 Reactions
1,307 Views
Posts: 5
Topic starter
(@mhawley80)
Active Member
Joined: 13 years ago

Dear All,

I dont have experience working with external libraries, so I need help on the following. I need to include in an user subroutine some new code using functions stored in external libraries, namely the LAPACK and BLAS libraries. I know that Fotran compiles this libraries because I already ran an example code using the libraries and it compiles and builds perfectly. However, when I include the example in the user subroutine and compile through ABAQUS (abaqus job=xxx user=fortran.f) I got the following linking error:

Creating library standardU.lib and object standardU.exp

libf.lib(puterr.obj) : error LNK2001: unresolved external symbol _errno

libf.lib(core.obj) : error LNK2001: unresolved external symbol _errno

libf.lib(core.obj) : error LNK2001: unresolved external symbol __adbgmsg

libf.lib(core.obj) : error LNK2001: unresolved external symbol __adbgmsg

libf.lib(core.obj) : error LNK2001: unresolved external symbol ___argv

libf.lib(core.obj) : error LNK2001: unresolved external symbol ___argc

libf.lib(core.obj) : error LNK2001: unresolved external symbol __doserrno

libf.lib(cio.obj) : error LNK2001: unresolved external symbol __pctype

libf.lib(creadn.obj) : error LNK2001: unresolved external symbol __pctype

libf.lib(cio.obj) : error LNK2001: unresolved external symbol ___mb_cur_max

libf.lib(creadn.obj) : error LNK2001: unresolved external symbol ___mb_cur_max

libf.lib(decflt.obj) : error LNK2001: unresolved external symbol __fltinf

libf.lib(encflt.obj) : error LNK2001: unresolved external symbol __fltout

standardU.dll : fatal error LNK1120: 9 unresolved externals

ABAQUS Error: Problem during linking - ABAQUS/Standard User Subroutines

ABAQUS/Analysis exited with errors

I have included the libraries in the file abaqus_v6.env as follows:

link_sl=LINK /nologo /subsystem:console /INCREMENTAL:NO /defaultlib:dformd.lib /nodefaultlib:dfor.lib /defaultlib:msvcrt.lib /nodefaultlib:msvcrtd.lib /nodefaultlib:libcd.lib /nodefaultlib:libc.lib /dll /def:%E /out:%U %F %A %B oldnames.lib user32.lib ws2_32.lib netapi32.lib advapi32.lib libblas.lib liblapack.lib

link_exe=LINK /nologo /subsystem:console /INCREMENTAL:NO /defaultlib:dformd.lib /nodefaultlib:dfor.lib /defaultlib:msvcrt.lib /nodefaultlib:msvcrtd.lib /nodefaultlib:libcd.lib /nodefaultlib:libc.lib /out:%J %F %M %L %B %O oldnames.lib user32.lib ws2_32.lib netapi32.lib advapi32.lib libblas.lib liblapack.lib

Any suggestion on how to correctly include the libraries and run the subroutine?? My system is WIN7, Visual Fortran V6 and Abaqus 6.5. Could be there any incompatibility?? If so, may you recommend me a new suit. 10x!!!

JC

1 Reply
Posts: 3998
(@jorgen)
Member
Joined: 5 years ago

First, does your code work without the external libraries?

Second, you need to place the shared library files in directories that Abaqus will find. It does not look like Abaqus finds what it needs.

-Jorgen

1 Reply
Share: