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

unresolved external symbol _MBLEN_TRIM@8

Les_Neilson
Valued Contributor II
427 Views

We have a subroutine whichhas a MBCS character string,and usesi = MBLen_Trim(string)

As perthe documentation we added a USE IFNLS at the topof the subroutine, and under Project properties-> Fortran-> Libraries ticked the box "Use portlib library" (command line option /4Yportlib.)

When linking we get the unresolved MBLen_Trim message

I have checked that the paths to the compiler bin, lib, and include directories are correct

What do I need to do to resolve the link?

Thanks

Les

0 Kudos
2 Replies
Steven_L_Intel1
Employee
427 Views

This is a bug in the IFNLS module where it names MBLEN instead of MBLEN_TRIM in the !DEC$ ATTRIBUTES DEFAULT directive. I'll report it.

Do you have CVF compatibility enabled? Sounds as if you do. If you don't need it, go to Properties..Fortran..External Procedures. Set Calling Convention to "Default" and string length argument passing to "after all args" or "inherit". Then rebuild.

0 Kudos
Les_Neilson
Valued Contributor II
427 Views

Thanks Steve,

We simply added a (modified) interface block for MBLen_Trim to our subroutine and it linked ok

Les

0 Kudos
Reply