Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

IVF main calling C++ dll

tom_c_lin
Beginner
437 Views
Good Morning everyone,
I encountered a problem in calling C++ dll from IVF andhope someone will be able to give some suggestions. Thanks. I created a C++ dll using .NET Wizards (see Walkthrough: Creating a COM Server Using Wizards) and wrote a C++ main program to call the routines in dll. It works fine. But when I tried to link the dll with a IVF main program. The following error appeared:
fatal error LNK 1136: invalid or corrupt file
Does any of you know how to resolve this problem? Thanks and have a great day.
Tom Lin
0 Kudos
2 Replies
tom_c_lin
Beginner
437 Views
Good Afternoon everyone,
I have a comment on the message I posted this morning and hope some of you will share some of your experiences.
I think the reason that my IVF main program fail to link with the C++ dll is because the C++dll I used (created by .NET Wizards) is an 'managed code' and IVF program will only link with 'unmanaged' .NET C++ libraries. Any thoughts or comments? Thank and have super evening.
Tom Lin
0 Kudos
Steven_L_Intel1
Employee
437 Views
You're right that if you built a "managed" DLL, you can't call it directly from unmanaged code. You could use the "Fortran Module Wizard" to generate interfaces for it, but it would be better to build an unmanaged DLL from your C++ code.
0 Kudos
Reply