{"id":62,"date":"2006-12-18T20:38:00","date_gmt":"2006-12-18T18:38:00","guid":{"rendered":"http:\/\/www.thelins.se\/johan\/blog\/2006\/12\/quick-question\/"},"modified":"2006-12-18T20:38:00","modified_gmt":"2006-12-18T18:38:00","slug":"quick-question","status":"publish","type":"post","link":"https:\/\/www.thelins.se\/johan\/blog\/2006\/12\/quick-question\/","title":{"rendered":">Quick Question"},"content":{"rendered":"<p>>Right now I&#8217;m building a dll file on Windows using the following make file:<\/p>\n<p><span style=\"font-size:85%;\"><span style=\"font-family: courier new;\">all: sum.dll<\/span><\/p>\n<p><span style=\"font-family: courier new;\">sum.o: sum.c<\/span><br \/><span style=\"font-family: courier new;\">    gcc    -c sum.c <\/span><\/p>\n<p><span style=\"font-family: courier new;\">sum.dll:    sum.o<\/span><br \/><span style=\"font-family: courier new;\">    gcc    -shared    -o sum.dll sum.o<\/span><\/span><\/p>\n<p>To build a so file on Unix I have to change the first and last lines to read <span style=\"font-size:85%;\"><span style=\"font-family: courier new;\">sum.so<\/span><\/span> instead of <span style=\"font-size:85%;\"><span style=\"font-family: courier new;\">sum.dll<\/span><\/span>. The same thing applies on OS X, but there I want to build <span style=\"font-size:85%;\"><span style=\"font-family: courier new;\">sum.dylib<\/span><\/span>. Does anyone know if there is a little flag or such that I can use to let GCC add the right file extension to the resulting file without having to play around with environment variables and such?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>>Right now I&#8217;m building a dll file on Windows using the following make file: all: sum.dll sum.o: sum.c gcc -c sum.c sum.dll: sum.o gcc -shared -o sum.dll sum.o To build a so file on Unix I have to change the first and last lines to read sum.so instead of sum.dll. The same thing applies on &hellip; <a href=\"https:\/\/www.thelins.se\/johan\/blog\/2006\/12\/quick-question\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">>Quick Question<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-62","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/posts\/62","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/comments?post=62"}],"version-history":[{"count":0,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/posts\/62\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/media?parent=62"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/categories?post=62"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/tags?post=62"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}