{"id":884,"date":"2012-06-27T17:00:21","date_gmt":"2012-06-27T21:00:21","guid":{"rendered":"http:\/\/wehuberconsultingllc.com\/wordpress\/?p=884"},"modified":"2012-06-27T17:00:21","modified_gmt":"2012-06-27T21:00:21","slug":"compiling-open-source-programs-using-mingwmsys","status":"publish","type":"post","link":"https:\/\/wehuberconsultingllc.com\/wordpress\/2012\/06\/27\/compiling-open-source-programs-using-mingwmsys\/","title":{"rendered":"Compiling Open Source Programs using MinGW\/MSYS"},"content":{"rendered":"<blockquote>\n<p><strong>MinGW<\/strong>, a contraction of &quot;Minimalist GNU for Windows&quot;, is a minimalist development environment for native Microsoft Windows applications.<\/p>\n<\/blockquote>\n<p>I was looking at an open source program(TCL\/TK) recently and decided to try compiling it from source. I checked out the <a href=\"http:\/\/www2.tcl.tk\/\">Tclers wiki<\/a> and it had instructions for several different programming environments. In the past I had mixed success using Microsoft&#8217;s <a href=\"http:\/\/www.microsoft.com\/visualstudio\/en-us\/products\/2010-editions\/express\">Visual Studio Express<\/a> and <a href=\"http:\/\/www.cygwin.com\/\">Cygwin<\/a> environments to compile open source software. Getting pre-made binaries is so much easier! Since I was feeling adventuresome, I opted for the MinGW\/MSYS environment. I was looking for a lean, mean open source compiling machine.<\/p>\n<p>Using the latest <a href=\"https:\/\/sourceforge.net\/projects\/mingw\/files\/Installer\/mingw-get-inst\/\">mingw-get-inst<\/a> version the installation of MinGW\/MSYS was pretty simple and quick. Then I followed the <a href=\"http:\/\/www2.tcl.tk\/_\/ref?N=14828\">Building Tcl\/Tk with Mingw<\/a> instructions. Since I had already installed MinGW\/MSYS, I skipped the part of the instructions that installed it. Within a couple of minutes I had a compiled version of TCL\/TK. I believe I installed the MingGW\/MSYS environment and compiled TCL\/TK in a shorter time than I would have spent installing Visual Studion Express.<img data-recalc-dims=\"1\" decoding=\"async\" style=\"border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none\" class=\"wlEmoticon wlEmoticon-winkingsmile\" alt=\"Winking smile\" src=\"https:\/\/i0.wp.com\/wehuberconsultingllc.com\/wordpress\/wp-content\/uploads\/2012\/06\/wlEmoticon-winkingsmile.png?w=840\" \/><\/p>\n<p>Since this compiling test went so well I was curious whether I could repeat this feat on a slightly more difficult animal, <a href=\"http:\/\/www.openssl.org\/\">OpenSSL<\/a>. The INSTALL.W32 had sufficient instructions to compile the program but I had to do it twice. MinGW\/MSYS is almost Linux. The problem I ran into was that it does not handle symbolic links very well. The note said it was essential that you use MSYS to unpack the source and they were right.&#160; Fortunately the &quot;configure&quot; stage fixes the problem. Everything went well except that I got a statically linked executable and I did not see the shared libraries, libeay32.dll and ssleay32.dll.&#160; It took me a little more looking before I figured out how to create the libraries. In my case I used the command, &quot;perl Configure mingw shared &#8211;prefix=\/c\/OpenSSL&quot;, to re-create the executable and shared libraries. If you looking for a lean environment to create windows binaries from open source programs, this environment is attractive. It is fast, uses the standard GNU compilers, and is free.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MinGW, a contraction of &quot;Minimalist GNU for Windows&quot;, is a minimalist development environment for native Microsoft Windows applications. I was looking at an open source program(TCL\/TK) recently and decided to try compiling it from source. I checked out the Tclers wiki and it had instructions for several different programming environments. In the past I had &hellip; <a href=\"https:\/\/wehuberconsultingllc.com\/wordpress\/2012\/06\/27\/compiling-open-source-programs-using-mingwmsys\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Compiling Open Source Programs using MinGW\/MSYS&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"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-884","post","type-post","status-publish","format-standard","hentry","category-open-source"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4iN3d-eg","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/posts\/884","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/comments?post=884"}],"version-history":[{"count":1,"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/posts\/884\/revisions"}],"predecessor-version":[{"id":885,"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/posts\/884\/revisions\/885"}],"wp:attachment":[{"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/media?parent=884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/categories?post=884"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/tags?post=884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}