{"id":4,"date":"2006-03-18T02:23:47","date_gmt":"2005-12-29T18:00:38","guid":{"rendered":""},"modified":"2017-03-07T09:35:42","modified_gmt":"2017-03-07T16:35:42","slug":"part_1_tools_for_win32_development_in_li","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/kingtaco\/2006\/03\/18\/part_1_tools_for_win32_development_in_li\/","title":{"rendered":"Part 1: tools for win32 development in linux"},"content":{"rendered":"<p>emerge the following packages to create a development environment:<\/p>\n<p><code><br \/>\ndev-util\/xmingw-binutils<br \/>\ndev-util\/xmingw-gcc<br \/>\ndev-util\/xmingw-runtime<br \/>\ndev-util\/xmingw-w32api<br \/>\napp-emulation\/wine<br \/>\n<\/code><\/p>\n<p>Use the following as a template for win32 makefiles:<\/p>\n<blockquote><p>\nCC=i386-mingw32msvc-gcc<br \/>\nCFLAGS=-O2 -pipe -std=c99 -mno-cygwin -mno-sse -mno-sse2 -mno-mmx -mthreads -DWIN32 -D_WIN32 -D_WINDOWS<\/p>\n<p>helloworld.exe: helloworld.o<br \/>\n        $(CC) $(CFLAGS) -luser32 -o $@ $?<\/p>\n<p>helloworld.o:   helloworld.c helloworld.h<br \/>\n        $(CC) $(CFLAGS) -o $@ -c $&lt;\n<\/p><\/blockquote>\n<p><em>NOTE: Now is not a good time to rice out your cflags.  Debugging win32 code is hard enough without the compiler playing tricks on you.<\/em><\/p>\n<p>\nTo test your new win32 program:<br \/>\n<code><br \/>\nwine .\/helloworld.exe<br \/>\n<\/code>\n<\/p>\n<p>\nPart 2 will talk about how to create win32 DLLs and import libraries.\n<\/p>\n<p>*EDIT* I&#8217;m sick of all the lame losers out there that keep spamming my blog, so no more comments until something can be worked out<\/p>\n","protected":false},"excerpt":{"rendered":"<p>emerge the following packages to create a development environment: dev-util\/xmingw-binutils dev-util\/xmingw-gcc dev-util\/xmingw-runtime dev-util\/xmingw-w32api app-emulation\/wine Use the following as a template for win32 makefiles: CC=i386-mingw32msvc-gcc CFLAGS=-O2 -pipe -std=c99 -mno-cygwin -mno-sse -mno-sse2 -mno-mmx -mthreads -DWIN32 -D_WIN32 -D_WINDOWS helloworld.exe: helloworld.o $(CC) $(CFLAGS) -luser32 -o $@ $? helloworld.o: helloworld.c helloworld.h $(CC) $(CFLAGS) -o $@ -c $&lt; NOTE: Now is &hellip; <a href=\"https:\/\/blogs.gentoo.org\/kingtaco\/2006\/03\/18\/part_1_tools_for_win32_development_in_li\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Part 1: tools for win32 development in linux<\/span><\/a><\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/kingtaco\/wp-json\/wp\/v2\/posts\/4"}],"collection":[{"href":"https:\/\/blogs.gentoo.org\/kingtaco\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.gentoo.org\/kingtaco\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/kingtaco\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/kingtaco\/wp-json\/wp\/v2\/comments?post=4"}],"version-history":[{"count":1,"href":"https:\/\/blogs.gentoo.org\/kingtaco\/wp-json\/wp\/v2\/posts\/4\/revisions"}],"predecessor-version":[{"id":47,"href":"https:\/\/blogs.gentoo.org\/kingtaco\/wp-json\/wp\/v2\/posts\/4\/revisions\/47"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/kingtaco\/wp-json\/wp\/v2\/media?parent=4"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/kingtaco\/wp-json\/wp\/v2\/categories?post=4"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/kingtaco\/wp-json\/wp\/v2\/tags?post=4"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}