{"id":379,"date":"2012-10-16T12:29:01","date_gmt":"2012-10-16T12:29:01","guid":{"rendered":"https:\/\/raspberry-projects.com\/pi\/?p=379"},"modified":"2014-09-26T15:05:29","modified_gmt":"2014-09-26T15:05:29","slug":"eclipse-general-notes","status":"publish","type":"post","link":"https:\/\/raspberry-projects.com\/pi\/programming-in-c\/compilers-and-ides\/eclipse\/eclipse-general-notes","title":{"rendered":"Eclipse General Notes"},"content":{"rendered":"<h4>\nAdding The&nbsp;bcm2835 Library By Mike McCauley<br \/>\n<\/h4>\n<p>\nInstall the library on a RPi by following the instructions <a href=\"https:\/\/raspberry-projects.com\/pi\/programming-in-c\/c-libraries\/bcm2835-by-mike-mccauley\" target=\"_blank\">here<\/a>.\n<\/p>\n<p>\nCopy the bcm2835-#.# folder after compiling it onto your windows PC using a USB stick.\n<\/p>\n<p>\nCopy the following files:\n<\/p>\n<p style=\"margin-left: 40px; \">\nbcm2835.o\n<\/p>\n<p style=\"margin-left: 40px; \">\nlibbcm2835.a\n<\/p>\n<p>\ninto the folder:\n<\/p>\n<p style=\"margin-left: 40px;\">\nC:\\cygwin\\opt\\cross\\x-tools\\arm-unknown-linux-gnueabi\\arm-unknown-linux-gnueabi\\sysroot\\usr\\lib\\\n<\/p>\n<h5>\nAdd the library to eclipse<br \/>\n<\/h5>\n<p>\nIn eclipse, right click your project &gt; Properties &gt; C\/C++ Build &gt; Settings &gt; Cygwin C++ Linker &gt; Libraries. &nbsp;Add a new library entry: bcm2835\n<\/p>\n<p>\nCopy file bcm2835.h into your project and include it in your source code files that use the IO.\n<\/p>\n<h4>\nAuto Save Before Build<br \/>\n<\/h4>\n<p>\nWindow &gt; Preferences &gt;&nbsp;General &gt; Workspace. &nbsp;Check &#39;Save automatically before build&#39;.\n<\/p>\n<h4>\nCompile Warnings Options<br \/>\n<\/h4>\n<p>\nRight click project &gt; Properties &gt; C\/C++ Build &gt; Settings &gt; Cygwin C++ Compiler &gt; Warnings (also Cygwin C Compiler)\n<\/p>\n<h4>\nAdding files to project<br \/>\n<\/h4>\n<p>\nJust copy them into the projects src folder and they will appear.\n<\/p>\n<p>\nOtherwise for files&nbsp;located outside of the project\n<\/p>\n<p>\nRight click the projects&nbsp;src folder &gt; Import &gt; General &gt; File System\n<\/p>\n<h4>\nTurning Off Warnings<br \/>\n<\/h4>\n<p>\nWindow &gt; Preferences &gt; C\/C++ &gt; Code Analysis. &nbsp;Uncheck warnings you don&#39;t want.\n<\/p>\n<h4>\nShow Line Numbers<br \/>\n<\/h4>\n<p>\nEclipse show line numbers option is in: Menu &gt; preference &gt; general &gt; editors &gt; text editors &gt; show line numbers.\n<\/p>\n<h4>\nAdding Object Files From Other Libraries<br \/>\n<\/h4>\n<p>\nThere can be issues with absolute paths when using Cygwin. &nbsp;They can be resolved by simply replacing all of the c:\/ with \/cygdrive\/c and storing the files in C:\\cygwin.\n<\/p>\n<h4>\nEclipse Resources<br \/>\n<\/h4>\n<p style=\"font-size: 10px;\">\n<a href=\"http:\/\/www3.ntu.edu.sg\/home\/ehchua\/programming\/howto\/EclipseCpp_HowTo.html\" target=\"_blank\">http:\/\/www3.ntu.edu.sg\/home\/ehchua\/programming\/howto\/EclipseCpp_HowTo.html<\/a>\n<\/p>\n<p style=\"font-size: 10px;\">\n&nbsp;\n<\/p>\n<p style=\"font-size: 10px;\">\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Adding The&nbsp;bcm2835 Library By Mike McCauley Install the library on a RPi by following the instructions here. Copy the bcm2835-#.# folder after compiling it onto your windows PC using a USB stick. Copy the following files: bcm2835.o libbcm2835.a into the folder: C:\\cygwin\\opt\\cross\\x-tools\\arm-unknown-linux-gnueabi\\arm-unknown-linux-gnueabi\\sysroot\\usr\\lib\\ Add the library to eclipse In eclipse, right click your project &gt; Properties [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-379","post","type-post","status-publish","format-standard","hentry","category-eclipse"],"_links":{"self":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/379","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/comments?post=379"}],"version-history":[{"count":17,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/379\/revisions"}],"predecessor-version":[{"id":1538,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/379\/revisions\/1538"}],"wp:attachment":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/media?parent=379"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/categories?post=379"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/tags?post=379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}