{"id":473,"date":"2018-12-15T12:02:01","date_gmt":"2018-12-15T05:02:01","guid":{"rendered":"https:\/\/luckytruedev.com\/learning\/?p=473"},"modified":"2019-10-04T06:02:09","modified_gmt":"2019-10-03T23:02:09","slug":"cara-memperbaiki-error-linker-pada-ide-clion","status":"publish","type":"post","link":"https:\/\/luckytruedev.com\/learning\/cara-memperbaiki-error-linker-pada-ide-clion\/","title":{"rendered":"Cara Memperbaiki Error Linker pada IDE CLion"},"content":{"rendered":"\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.00-1024x640.jpg\" alt=\"\" class=\"wp-image-474\" srcset=\"https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.00.jpg 1024w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.00-300x188.jpg 300w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.00-768x480.jpg 768w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.00-110x69.jpg 110w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.00-420x263.jpg 420w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.00-688x430.jpg 688w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.00-20x13.jpg 20w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Halo<\/figcaption><\/figure><\/div>\n\n\n<div id=\"lucky-1975408063\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-5605825534849002\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:block;\" data-ad-client=\"ca-pub-5605825534849002\" \ndata-ad-slot=\"5317815257\" \ndata-ad-format=\"auto\" data-full-width-responsive=\"true\"><\/ins>\n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div>\n\n\n<p>kali ini gw mau share cara memperbaiki error linker pada C++ Clion ketika ingin menrun aplikasi, emang nyeselin sih kalo udah kayak gitu, apalagi kalo kita gatau caranya, frustasi banget, tapi aslinya caranya mudah kok. langsung aja ya.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"277\" height=\"404\" src=\"https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.11.jpg\" alt=\"\" class=\"wp-image-475\" srcset=\"https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.11.jpg 277w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.11-206x300.jpg 206w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.11-75x110.jpg 75w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.11-14x20.jpg 14w\" sizes=\"auto, (max-width: 277px) 100vw, 277px\" \/><figcaption>File CMakeList.txt<br><\/figcaption><\/figure><\/div>\n\n\n\n<p>kalian buka file &#8220;CMakeLists.txt&#8221; disana akan ada sebuah konfigurasi gitu untuk menjalankan projeknya, dan kalian cek dahulu, apakah sudah benar atau tidak.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"555\" height=\"201\" src=\"https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.25.jpg\" alt=\"\" class=\"wp-image-476\" srcset=\"https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.25.jpg 555w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.25-300x109.jpg 300w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.25-110x40.jpg 110w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.25-420x152.jpg 420w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.25-20x7.jpg 20w\" sizes=\"auto, (max-width: 555px) 100vw, 555px\" \/><figcaption>Isi file CMakeList.txt<\/figcaption><\/figure><\/div>\n\n\n\n<p>setelah dibuka akan muncul seperti ini, dan kita perhatikan di bagian &#8220;add_executable&#8221; pada baris 6 cuma ada tulisan file &#8220;main.cpp&#8221; padahal pada gambar yang diatas yang bercaptionkan &#8220;File CMakeList.txt&#8221; bukan hanya file Main saja tetapi ada file header, menu, welcome dengan ekstensi .cpp dan .h (header), untuk dapat dijalankan kalian harus menambahkan header, menu dan welcome kedalam file CMakeList.txt agar bisa dijalankan projek kalian, contohnya seperti ini.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"760\" height=\"212\" src=\"https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.40.jpg\" alt=\"\" class=\"wp-image-477\" srcset=\"https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.40.jpg 760w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.40-300x84.jpg 300w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.40-110x31.jpg 110w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.40-420x117.jpg 420w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.40-20x6.jpg 20w\" sizes=\"auto, (max-width: 760px) 100vw, 760px\" \/><figcaption>file CMakelist.txt yang sudah diedit<\/figcaption><\/figure><\/div>\n\n\n\n<p>masukan nama file yang ada di projek agar bisa di eksekusi oleh CMake, pastikan sesuai yang ada di projek, misalnya ada file &#8220;Halaman1.cpp, Halaman1.h&#8221; berati kedua file itu harus di tambahkan kedalam &#8220;add_executable&#8221; pada file CMakeList, agar bisa dijalankan.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.52-1024x640.jpg\" alt=\"\" class=\"wp-image-478\" srcset=\"https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.52.jpg 1024w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.52-300x188.jpg 300w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.52-768x480.jpg 768w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.52-110x69.jpg 110w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.52-420x263.jpg 420w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.52-688x430.jpg 688w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Screen-Shot-2018-12-12-at-20.16.52-20x13.jpg 20w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Hasil Akhir<\/figcaption><\/figure><\/div>\n\n\n\n<p>Jika berhasil program dapat dijalankan tanpa ada error linker, Selamat!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Akhir Kata<\/h2>\n\n\n\n<p>Mungkin itu aja sih dari gw, alasan gw buat artikel ini karena pernah ngalamin juga dan merasa frustasi tetapi setelah tau penyebabnya dan cara memperbaikinya merasa &#8220;ah gitu doang ternyata&#8221; sebenernya ini mudah sih, hehe makasih ya \ud83d\ude42<\/p>\n<div id=\"lucky-1419568155\" class=\"lucky-after-content lucky-entity-placement\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-5605825534849002\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:block;\" data-ad-client=\"ca-pub-5605825534849002\" \ndata-ad-slot=\"5317815257\" \ndata-ad-format=\"auto\" data-full-width-responsive=\"true\"><\/ins>\n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>kali ini gw mau share cara memperbaiki error linker pada C++ Clion ketika ingin menrun aplikasi, emang nyeselin sih kalo udah kayak gitu, apalagi kalo kita gatau caranya, frustasi banget, tapi aslinya caranya mudah kok. langsung aja ya. kalian buka file &#8220;CMakeLists.txt&#8221; disana akan ada sebuah konfigurasi gitu untuk menjalankan projeknya, dan kalian cek dahulu, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":474,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27,79],"tags":[],"class_list":["post-473","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ltdv-cpp-tutor","category-ltdv-problem-solve"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/luckytruedev.com\/learning\/wp-json\/wp\/v2\/posts\/473","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/luckytruedev.com\/learning\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/luckytruedev.com\/learning\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/luckytruedev.com\/learning\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/luckytruedev.com\/learning\/wp-json\/wp\/v2\/comments?post=473"}],"version-history":[{"count":2,"href":"https:\/\/luckytruedev.com\/learning\/wp-json\/wp\/v2\/posts\/473\/revisions"}],"predecessor-version":[{"id":2334,"href":"https:\/\/luckytruedev.com\/learning\/wp-json\/wp\/v2\/posts\/473\/revisions\/2334"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/luckytruedev.com\/learning\/wp-json\/wp\/v2\/media\/474"}],"wp:attachment":[{"href":"https:\/\/luckytruedev.com\/learning\/wp-json\/wp\/v2\/media?parent=473"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/luckytruedev.com\/learning\/wp-json\/wp\/v2\/categories?post=473"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/luckytruedev.com\/learning\/wp-json\/wp\/v2\/tags?post=473"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}