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

Link error in Mixed language (CPP calling f77-imsl)

pchidamb
Beginner
424 Views
Hi My main function is in CPP. I created fortran static lib and linked with CPP exe. Fortran static lib calls imsl lib. Here I have comprehended 4 scenarios. Please give me some input to resolve the link error in case 2. ===================================================================================================== Platform: Vista 32-bit, VS 2008. Main function : CPP (Intel(R) C++ Compiler Professional for applications running on IA-32, Version 11.0 Package ID: w_cproc_p_11.0.066) Called function : f77 (Intel(R) Visual Fortran Compiler Professional for applications running on IA-32, Version 11.0 Package ID: w_cprof_p_11.0.072) **Tools->options->compiler path is set. 1. Calling sequence: CPP function--->fortran function--->imsl ( CALL DCBJS (XNU, k2rb, MTETA, CJk2rb)) fortran static lib created. Data type: XNU - double k2rb - complex double MTETA - integer CJk2rb - complex double Status : works fine 2. Calling sequence: CPP function--->fortran function--->imsl ( CALL DBSJS (XNU, k2rb, MTETA, Jk2rb)) fortran static lib created. Data type: XNU - double k2rb - double MTETA - integer CJk2rb - double Status : link error **** ********error LNK2019: unresolved external symbol _DCOPY referenced in function _DB2JS **** 3. Calling sequence: fortran function--->imsl ( CALL DCBJS (XNU, k2rb, MTETA, CJk2rb)) fortran exe created. Data type: XNU - double k2rb - complex double MTETA - integer CJk2rb - complex double Status : works fine 4. Calling sequence: fortran function--->imsl ( CALL DBSJS (XNU, k2rb, MTETA, Jk2rb)) fortran exe created. Data type: XNU - double k2rb - double MTETA - integer CJk2rb - double Status : works fine
0 Kudos
2 Replies
TimP
Honored Contributor III
424 Views

DCOPY would be available in MKL.  I've never had access to IMSL for ifort, so don't know if that's the expected way of resolving this dependency.  The buildlog should show whether an attempt was made to link against MKL.

0 Kudos
Steven_L_Intel1
Employee
423 Views

Yes, that is correct. IMSL requires MKL.

0 Kudos
Reply