{"id":5639,"date":"2015-10-13T15:44:33","date_gmt":"2015-10-13T13:44:33","guid":{"rendered":"http:\/\/www.b.shuttle.de\/hayek\/hayek\/jochen\/wp\/blog-en\/?p=5639"},"modified":"2015-10-13T15:44:33","modified_gmt":"2015-10-13T13:44:33","slug":"vcvarsall-bat","status":"publish","type":"post","link":"https:\/\/wp.jochen.hayek.name\/blog-en\/2015\/10\/13\/vcvarsall-bat\/","title":{"rendered":"using Microsoft Visual Studio&#8217;s C++ compiler commandline-wise &#8212; vcvarsall.bat"},"content":{"rendered":"<ul>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Java_Native_Interface#HelloWorld\">https:\/\/en.wikipedia.org\/wiki\/Java_Native_Interface#HelloWorld<\/a><\/li>\n<\/ul>\n<p>nice example illustrating how to properly qualify absolutely wherever possible (i.e. avoiding getting things found through PATH et al.!):<\/p>\n<pre>SET PF=C:Program Files\nSET PFx86=C:Program Files (x86)\nSET VSINSTALLDIR=%PFx86%Microsoft Visual Studio 10.0\nSET VCINSTALLDIR=%VSINSTALLDIR%VC\n:: Add compiler tools folder to the PATH variable.\n:: Do not run this too many times\n:: or %Path% will exceed the maximum limit.\n<strong>call \"%VCINSTALLDIR%vcvarsall.bat\"<\/strong>\n:: Microsoft Windows SDK for Windows 7 and .NET Framework 4 \n:: (gets set by vcvarsall.bat)\n::::SET WindowsSdkDir=...Microsoft SDKsWindows...\n\nSET JAVA_HOME=%PF%Javajdk1.8.0_60\npath %Path%;%JAVA_HOME%bin\njavac HelloWorld.java\njavah HelloWorld\n:: On Windows, the JNI library should not have a \"lib\" prefix\n%VC%bincl \/I%JAVA_HOME%include \/I%JAVA_HOME%includewin32 \/I%VC%include \/I%VC%lib \/I%MSDK%Lib libHelloWorld.c \/FeHelloWorld.dll \/LD\njava HelloWorld<\/pre>\n<p>The wikipedia article got the batch file quoting wrong &#8212; of course I couldn&#8217;t help and I corrected that.\t\t\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/en.wikipedia.org\/wiki\/Java_Native_Interface#HelloWorld nice example illustrating how to properly qualify absolutely wherever possible (i.e. avoiding getting things found through PATH et al.!): SET PF=C:Program Files SET PFx86=C:Program Files (x86) SET VSINSTALLDIR=%PFx86%Microsoft Visual Studio 10.0 SET VCINSTALLDIR=%VSINSTALLDIR%VC :: Add compiler tools folder to the PATH variable. :: Do not run this too many times :: or %Path% will [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","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":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_share_on_mastodon":"0"},"categories":[666],"tags":[],"class_list":["post-5639","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"share_on_mastodon":{"url":"","error":""},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paO0kP-1sX","jetpack_likes_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/5639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/comments?post=5639"}],"version-history":[{"count":0,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/5639\/revisions"}],"wp:attachment":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/media?parent=5639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/categories?post=5639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/tags?post=5639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}