{"id":144,"date":"2009-09-17T10:10:00","date_gmt":"2009-09-17T09:10:00","guid":{"rendered":"http:\/\/www.miscdebris.net\/blog\/?p=144"},"modified":"2009-09-17T21:53:14","modified_gmt":"2009-09-17T20:53:14","slug":"adding-gdi-headers-to-mingw-to-compile-wxwidgets-with-wxgraphicscontext-support","status":"publish","type":"post","link":"http:\/\/www.miscdebris.net\/blog\/2009\/09\/17\/adding-gdi-headers-to-mingw-to-compile-wxwidgets-with-wxgraphicscontext-support\/","title":{"rendered":"Adding GDI+ headers to MinGW (to compile wxWidgets with wxGraphicsContext support)"},"content":{"rendered":"<p>The GDI+ library is mandatory for wxGraphicsContext support on Win32. This is no problem if you&#8217;re using Visual C++, since the SDK provides the headers and import libraries, but for MinGW there are no such headers and import libraries provided. But there are some sources on the internet where you can get the necessary files.<\/p>\n<p><!--more--><\/p>\n<p>Elaborate instructions to convert files from the Visual C++ SDK for MinGW usage can be found @ <a href=\"http:\/\/wiki.bb4win.org\/wiki\/Using_GDIPlus_With_MinGW\" target=\"_blank\">http:\/\/wiki.bb4win.org\/wiki\/Using_GDIPlus_With_MinGW<\/a> while <a href=\"http:\/\/lists-archives.org\/mingw-users\/08437-contributing-gdi-headers.html\" target=\"_blank\">here<\/a> you can follow a discussion about an unsuccessful contribution to MinGW (and see what difficulties such projects have).<\/p>\n<p>The most easiest solution seem to be the files provided by <a href=\"http:\/\/code.google.com\/p\/wxmax\/\" target=\"_blank\">wxmax<\/a> (BlitzMax bindings for wxWidgets) where a zip file containing headers and import library (already altered for MinGW usage) is <a href=\"http:\/\/code.google.com\/p\/wxmax\/downloads\/detail?name=gdiplus_includes.zip&amp;can=2&amp;q=\" target=\"_blank\">available for download<\/a> (<a href=\"http:\/\/www.miscdebris.net\/upload\/gdiplus_includes.zip\" target=\"_self\">local copy<\/a>). Just copy the files from the &#8220;include&#8221; directory into C:\\MinGW\\include (or wherever your MinGW files are) and the file from the &#8220;lib&#8221; directory into C:\\MinGW\\lib.<\/p>\n<p>This should be enough to so that MinGW can compile wxWidgets with GDI+ support, e.g.<\/p>\n<pre>cd %WXWIN%\\build\\msw\r\nmingw32-make -f makefile.gcc BUILD=release SHARED=1 USE_GDIPLUS=1\r\nset PATH=%WXWIN%\\lib\\gcc_dll;%PATH%\r\ncd %WXWIN%\\samples\\drawing\r\nmingw32-make -f makefile.gcc BUILD=release SHARED=1 USE_GDIPLUS=1\r\ngcc_mswdll\\drawing.exe<\/pre>\n<p>And voila!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The GDI+ library is mandatory for wxGraphicsContext support on Win32. This is no problem if you&#8217;re using Visual C++, since the SDK provides the headers and import libraries, but for MinGW there are no such headers and import libraries provided. But there are some sources on the internet where you can get the necessary files.<\/p>\n","protected":false},"author":1,"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","enabled":false},"version":2}},"categories":[30,24],"tags":[20,31],"class_list":["post-144","post","type-post","status-publish","format-standard","hentry","category-development","category-windows","tag-mingw","tag-wxwidgets"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6pnj-2k","_links":{"self":[{"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/posts\/144"}],"collection":[{"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/comments?post=144"}],"version-history":[{"count":9,"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/posts\/144\/revisions"}],"predecessor-version":[{"id":247,"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/posts\/144\/revisions\/247"}],"wp:attachment":[{"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/media?parent=144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/categories?post=144"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/tags?post=144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}