Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create DLL file in ADAMS

Status
Not open for further replies.

Saleh abbasi

Mechanical
May 27, 2023
15
I want to create DLL file for using in ADAMS at motion, so i found a code in Fortran with name motsub1.f, I am beginner in Fortran and just change of this code VALUE and do steps in image to create DLL of it, but i get error, what is ifort and link.exe?
8_traqis.jpg
 
Replies continue below

Recommended for you

yes, i run a sfosub_sample.c for test and get this error too.
 
Sorry it's about 12 years since I last did this, and no longer have acces to ADAMS. Perhaps you could try the MSC forums?


Cheers

Greg Locock


New here? Try reading these, they might help FAQ731-376
 
Adams write that files compiled with Intel parallel xe 2019 update 4, this software have Fortran compiler and Visual Studio 2017 for c++ compiler, but now Visual Studio 2017 and this intel can't be integrate together, but it's no matter which version we used, just they must can be integrate. To fix problem, I installed Intel OneAPI 2023.1 and Visual Studio 2022 17.5.6 and set the environment variables.
However, this led to a new error:
2_aciqnh.png

To fix this error, Found a library from my Visual Studio directory that was missing in the <install_dir>\Adams\<version>\win64 directory and copy it.
Repeated the same process for other libraries that were causing similar errors, finding them from either Visual Studio or Intel OneAPI directories.
Also one of library kernel32.lib I find from C:\Program Files (x86)\Windows Kits\10\Lib\<version>\um\x64

I hope this solution can also solve the problem of others in creating DLL file.

But when i used other library such as math.h or stdio.h in my code, i got this error:
3_tgiztl.png


I copied math.h library to current directory of creating dll file, like slv_c_utils.h, when I delete slv_c_utils.h library also get this error too, but in math.h and other libraries don't solved problem. my VS code can recognize libraries and don't have any problem, I try add libraries to environment variables. but problem don't solved.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor