{"action":"created","issue":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/159","labels_url":"https://api.github.com/repos/chrsmith/bwapi/issues/159/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/bwapi/issues/159/comments","events_url":"https://api.github.com/repos/chrsmith/bwapi/issues/159/events","html_url":"https://github.com/chrsmith/bwapi/issues/159","id":58480899,"number":159,"title":"mingw port","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Priority-Low","name":"Priority-Low","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Type-Enhancement","name":"Type-Enhancement","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-02-21T23:54:22Z","updated_at":"2015-02-21T23:54:23Z","closed_at":null,"body":"```\nIt would be nice to be able to compile BWAPI using the free and easy to set \nup MingW compiler (based on GCC), which also runs under Linux/WINE.\nI have already contributed a preliminary patch but the work is not done \nyet.\n\nTo do so, we must avoid using any proprietary Visual C++ compiler/library \nextensions such as:\n\n* for each statement, instead use <Util/Foreach.h>:\n  foreach(Type& elem, collection) { ... }\n  If the type name contains a comma, use a local typedef:\n  typedef std::pair<int, float> pair;\n  foreach(pair& p, collection) { ...}\n\n* all the *_s functions, such as memcpy_s, fprintf_s, .... If possible, use \nthe regular functions or add/use a port from <Util/Gnu.h>\n\n* (not strictly necessary) Use / in paths, #include <Dir/File.h>, not \n#include <Dir\\File.h>\n\nAlso, the Intel-syntax inline assembly must be ported to AT&T syntax which \nGCC uses.\n\nThe latest MingW can be obtained from http://tdragon.net/recentgcc/\n```\n\n-----\nOriginal issue reported on code.google.com by `slowb...@gmail.com` on 3 Dec 2009 at 9:58"},"comment":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/comments/75401137","html_url":"https://github.com/chrsmith/bwapi/issues/159#issuecomment-75401137","issue_url":"https://api.github.com/repos/chrsmith/bwapi/issues/159","id":75401137,"user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"created_at":"2015-02-21T23:54:23Z","updated_at":"2015-02-21T23:54:23Z","body":"```\nWith my last few commits bwapi now compiles (but does not yet link) in gcc. But \nyeah\nit sounds like GCC's version of __declspec(naked) - __attribute__((naked)) - \ndoes not\nwork properly, so unless someone is able to fix/update gcc, theres little point\npursuing this matter further since those functions must be naked for BWAPI to \nwork.\n\nI agree with Teabix and Slowbyte - we should just focus on making sure its \npossible\nto compile BWAgent in both gcc and visual studio.\n```\n\n-----\nOriginal comment by `lowerlo...@gmail.com` on 4 Dec 2009 at 4:03"}}