
{"id":8128,"date":"2013-01-26T17:18:14","date_gmt":"2013-01-26T17:18:14","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=8128"},"modified":"2013-01-26T17:18:14","modified_gmt":"2013-01-26T17:18:14","slug":"gcc-commandline-options-part-5","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2013\/01\/26\/gcc-commandline-options-part-5\/","title":{"rendered":"GCC COMMANDLINE OPTIONS PART 5"},"content":{"rendered":"<h4><u>commandline session<\/u><\/h4>\n<pre>\n$cat main.c\n#include&lt;stdio.h&gt;\n#include&lt;math.h&gt;\n\nint main(void)\n{\n   int i;\n   float y;\n   printf(\"n The Geek Stuff [%d]n\", i);\n   y=sinf(2.5);\n   printf(\"%fn\",y);\n   return 0;\n}\n$gcc main.c\n$.\/a.out\n\n The Geek Stuff [0]\n0.598472\n$gcc main.c -lmath\n\/usr\/bin\/ld: cannot find -lmath\ncollect2: error: ld returned 1 exit status\n$gcc main.c -llibmath\n\/usr\/bin\/ld: cannot find -llibmath\ncollect2: error: ld returned 1 exit status\n$gcc -Wall main.c\nmain.c: In function \u2018main\u2019:\nmain.c:8:10: warning: \u2018i\u2019 is used uninitialized in this function [-Wuninitialized]\n$gcc -Wall main.c -llibImath\nmain.c: In function \u2018main\u2019:\nmain.c:8:10: warning: \u2018i\u2019 is used uninitialized in this function [-Wuninitialized]\n\/usr\/bin\/ld: cannot find -llibImath\ncollect2: error: ld returned 1 exit status\n$gcc -Wall main.c -lImath\nmain.c: In function \u2018main\u2019:\nmain.c:8:10: warning: \u2018i\u2019 is used uninitialized in this function [-Wuninitialized]\n\/usr\/bin\/ld: cannot find -lImath\ncollect2: error: ld returned 1 exit status\n$gcc -Wall main.c -l Imath\nmain.c: In function \u2018main\u2019:\nmain.c:8:10: warning: \u2018i\u2019 is used uninitialized in this function [-Wuninitialized]\n\/usr\/bin\/ld: cannot find -lImath\ncollect2: error: ld returned 1 exit status\n$gcc  main.c -lImath\n\/usr\/bin\/ld: cannot find -lImath\ncollect2: error: ld returned 1 exit status\n$gcc  main.c -lImath\n\/usr\/bin\/ld: cannot find -lImath\ncollect2: error: ld returned 1 exit status\n$ln -s \/usr\/lib\/libImath.so.6\nlibImath.so.6      libImath.so.6.0.0\n$ln -s \/usr\/lib\/libImath.so.6.0.0 \/usr\/lib\/libImath.so\nln: failed to create symbolic link `\/usr\/lib\/libImath.so': Permission denied\n$sudo ln -s \/usr\/lib\/libImath.so.6.0.0 \/usr\/lib\/libImath.so\n$gcc  main.c -lImath\n$\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>commandline session $cat main.c #include&lt;stdio.h&gt; #include&lt;math.h&gt; int main(void) { int i; float y; printf(&#8220;n The Geek Stuff [%d]n&#8221;, i); y=sinf(2.5); printf(&#8220;%fn&#8221;,y); return 0; } $gcc main.c $.\/a.out The Geek Stuff [0] 0.598472 $gcc main.c -lmath \/usr\/bin\/ld: cannot find -lmath collect2: error: ld returned 1 exit status $gcc main.c -llibmath \/usr\/bin\/ld: cannot find -llibmath collect2: error: &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2013\/01\/26\/gcc-commandline-options-part-5\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;GCC COMMANDLINE OPTIONS PART 5&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/8128"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=8128"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/8128\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=8128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=8128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=8128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}