{"id":436,"date":"2010-11-08T18:36:52","date_gmt":"2010-11-09T01:36:52","guid":{"rendered":"http:\/\/mattfife.net\/wordpress\/?p=436"},"modified":"2012-08-12T19:20:03","modified_gmt":"2012-08-13T02:20:03","slug":"error-lnk2019-unresolved-external-symbol-_vmlsln4","status":"publish","type":"post","link":"https:\/\/mattfife.com\/?p=436","title":{"rendered":"error LNK2019: unresolved external symbol _vmlsLn4"},"content":{"rendered":"<p>If you get this message while converting some code from compiling with the Intel Compiler over to using Visual Studio, then I have a solution for you:<\/p>\n<blockquote><p> error LNK2019: unresolved external symbol _vmlsLn4 referenced in function &#8220;BLAHBLAH&#8221;<br \/>\nfatal error LNK1120: 1 unresolved externals<\/p><\/blockquote>\n<p><strong>Problem:<\/strong><br \/>\nThe Short Vector Math Library (SVML) which has the vmlsLn4() function is implemented in\u00a0 svml_disp.lib.\u00a0 Now this lib is usually only for the Intel Compiler&#8217;s use in vectorizing code but if someone used any of the SVML instructions, you can do the below trick to fix it.\u00a0 See <a href=\"http:\/\/software.intel.com\/en-us\/articles\/how-to-implement-the-short-vector-math-library\/\" target=\"_blank\">this article <\/a>for more details about using SVML.<\/p>\n<p><strong>Solution:<\/strong><br \/>\n1. Install the latest Intel Compiler (with Visual Studio links if it asks).\u00a0 If that doesn&#8217;t come with the library you need, install Install Intel Parallel Studio as well. Between the two, you&#8217;ll get the svml_disp.lib you need.<\/p>\n<p>2.\u00a0 At the top of the .h\/.cpp file that uses , declare this external:<span><span class=\"keyword\"><br \/>\n<strong>extern<\/strong><\/span><strong><span>\u00a0<\/span><span class=\"string\">&#8220;C&#8221;<\/span><\/strong><span><strong>\u00a0{\u00a0__m128d\u00a0vmldLn2(__m128d\u00a0a);\u00a0} <\/strong><br \/>\n<\/span><\/span><\/p>\n<p>3. Go to your project settings, and for the library includes, add:<br \/>\n<strong>svml_disp.lib<\/strong><\/p>\n<p>4. In the &#8216;Additional Library Directories&#8221; box, add a path to wherever you installed the Intel compiler&#8217;s lib directory.\u00a0 The default location is:<br \/>\n<strong>C:Program Files (x86)IntelCompiler11.1\u000067libia32<\/strong><\/p>\n<p>Hit F7 in Visual Studio and you should build like a champ and run just fine.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you get this message while converting some code from compiling with the Intel Compiler over to using Visual Studio, then I have a solution for you: error LNK2019: unresolved external symbol _vmlsLn4 referenced in function &#8220;BLAHBLAH&#8221; fatal error LNK1120: 1 unresolved externals Problem: The Short Vector Math Library (SVML) which has the vmlsLn4() function is implemented in\u00a0 svml_disp.lib.\u00a0 Now this lib is usually only for the Intel Compiler&#8217;s use in vectorizing code but if someone used any of the&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/mattfife.com\/?p=436\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7],"tags":[],"class_list":["post-436","post","type-post","status-publish","format-standard","hentry","category-technicalprogramming"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4WECr-72","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/mattfife.com\/index.php?rest_route=\/wp\/v2\/posts\/436","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mattfife.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mattfife.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mattfife.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mattfife.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=436"}],"version-history":[{"count":1,"href":"https:\/\/mattfife.com\/index.php?rest_route=\/wp\/v2\/posts\/436\/revisions"}],"predecessor-version":[{"id":584,"href":"https:\/\/mattfife.com\/index.php?rest_route=\/wp\/v2\/posts\/436\/revisions\/584"}],"wp:attachment":[{"href":"https:\/\/mattfife.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=436"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mattfife.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=436"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mattfife.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=436"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}