LNK2019

LNK2019

Can someone help me understand why I have these errors. This was a code which worked well in F77 but when I tried to convert got these errors.

clam error LNK2019: unresolved external symbol __imp__SafeArrayDestroy@4 referenced in function _CleanUpVariant

clam error LNK2019: unresolved external symbol __imp__SysFreeString@4 referenced in function _CleanUpVariant

clam error LNK2019: unresolved external symbol __imp__VariantInit@4 referenced in function _NewInvokeArg

clam error LNK2019: unresolved external symbol __imp__VariantChangeType@16 referenced in function _SetResult

clam error LNK2019: unresolved external symbol __imp__SafeArrayGetElement@12 referenced in function _SetResult

clam error LNK2019: unresolved external symbol __imp__SafeArrayGetLBound@12 referenced in function _SetResult

clam error LNK2019: unresolved external symbol __imp__SafeArrayGetUBound@12 referenced in function _SetResult

clam error LNK2019: unresolved external symbol __imp__SafeArrayGetDim@4 referenced in function _SetResult

clam error LNK2019: unresolved external symbol __imp__SysStringLen@4 referenced in function _SetResult

clam error LNK2019: unresolved external symbol __imp__SysAllocString@4 referenced in function _OLECFSTRINGTOBSTR
clam error LNK2019: unresolved external symbol _SafeArrayCreate@12 referenced in function _AUTOADDARG2INTEGER2ARRAY
clam error LNK2019: unresolved external symbol _SafeArrayPutElement@12 referenced in function _AUTOADDARG2INTEGER2ARRAY
clam error LNK2019: unresolved external symbol _SysFreeString@4 referenced in function _AUTOADDARG2CHARACTERARRAY
clam fatal error LNK1120: 13 unresolved externals

Can anyone help me understadn what to do to resilve these errors.
I don't have these functions in my code

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi,

Can you clarify what you mean by convert? Is this a conversion of F77 code to C++? From the unresolved errors, it looks like the link is not seeing the import library where these routines are defined. Without knowing the details, I'd suggest seeing if you know where the missing routines are defined (in a library) and making sure the library gets linked in via the -l option.

Max

I encounter the same problem when I call IMSL routines. As long as I disable the calling function, I won't see LNK2019 error. I do not find any errors in environmental settings.

The error message I got is
error LNK2019: unresolved external symbol _RESET referenced in function _DRAWALD draw_uni_iid_ALD.obj

Please help.

Leave a Comment

Please sign in to add a comment. Not a member? Join today