Abaqus - How to link external libraries in Abaqus?

Hi,

I was trying to link an external arbitrary-presicion ForTran library in Abaqus.

As usual, when we are using a external library in ForTran, we can compile library files (.f90) and obtain object files (.o).

In my case, we use "gfortran fmsave.o FM.o FMZM90.o Test.o -o Test.exe". Then we run Test.exe.

In terms of ABAQUS, I have linked ABAQUS 2021 with Visual Studio 2019 and OneAPI 2022. It seems that I should change the environment file (.env) to link this external library in ABAQUS. But I cannot make it. 

My main questions are:

  1. Should we compile the external ForTran library to object files (.o) or library files (.lib), in order to link it in ABAQUS? (I understand we must use the same compiler, e.g. OneAPI for me.)
  2. Where should we put these compiled files? For now, I put them in "install_dir/os/code/bin/" and add this address to the environment file, as shown below.
  3. How should we change the environment file (win86_64.env)?

My environment file looks like:

link_sl=['LINK',
'/nologo', '/NOENTRY', '/INCREMENTAL:NO', '/subsystem:console', '/machine:AMD64',
'/NODEFAULTLIB:LIBC.LIB', '/NODEFAULTLIB:LIBCMT.LIB',
'/DEFAULTLIB:OLDNAMES.LIB', '/DEFAULTLIB:LIBIFCOREMD.LIB', '/DEFAULTLIB:LIBIFPORTMD.LIB', '/DEFAULTLIB:LIBMMD.LIB',
'/DEFAULTLIB:kernel32.lib', '/DEFAULTLIB:user32.lib', '/DEFAULTLIB:advapi32.lib',
'/FIXED:NO', '/dll',
#'/debug', # <-- Debugging
'/def:%E', '/out:%U', '%F', '%A', '%L', '%B', 
'oldnames.lib', 'user32.lib', 'ws2_32.lib', 'netapi32.lib',
'advapi32.lib', 'msvcrt.lib', 'vcruntime.lib', 'ucrt.lib']

link_exe=['LINK',
'/nologo', '/INCREMENTAL:NO', '/subsystem:console', '/machine:AMD64', '/STACK:20000000',
'/NODEFAULTLIB:LIBC.LIB', '/NODEFAULTLIB:LIBCMT.LIB', '/DEFAULTLIB:OLDNAMES.LIB', '/DEFAULTLIB:LIBIFCOREMD.LIB',
'/DEFAULTLIB:LIBIFPORTMD.LIB', '/DEFAULTLIB:LIBMMD.LIB', '/DEFAULTLIB:kernel32.lib',
'/DEFAULTLIB:user32.lib', '/DEFAULTLIB:advapi32.lib',
'/FIXED:NO', '/LARGEADDRESSAWARE',
# '/debug', # <-- Debugging
'/out:%J', '%F', '%M', '%L', '%B', '%O',
'oldnames.lib', 'user32.lib', 'ws2_32.lib', 'netapi32.lib',
'advapi32.lib', 'msvcrt.lib', 'vcruntime.lib', 'ucrt.lib']

I have tried to add 'C:\\SIMULIA\\EstProducts\\2021\\win_b64\\code\\bin\\module\\LibFM.lib' to it. But it didn't work.

I would appreciate it very much if anyone could give me some suggestions. And I will also share the my solution (if it works) in ResearchGate or somewhere else to help more people.

Many thanks!