{"id":28,"date":"2008-09-21T23:33:00","date_gmt":"2008-09-22T06:33:00","guid":{"rendered":"http:\/\/samueldotj.com\/blog\/?p=28"},"modified":"2013-08-26T18:36:17","modified_gmt":"2013-08-27T01:36:17","slug":"codelite-ide-for-c","status":"publish","type":"post","link":"http:\/\/samueldotj.com\/blog\/codelite-ide-for-c\/","title":{"rendered":"CodeLite &#8211; IDE for C"},"content":{"rendered":"<p>For my C projects I was using Notepad++ as my editor\/IDE for some time. Although notepad++ is good, it is lacking the integration with a code browser, source control and debugger. I came to know about a new IDE &#8211; <a href=\"http:\/\/www.blogger.com\/www.codelite.org\">CodeLite<\/a>when I was searching for ctags for windows. It has integrated support for <a href=\"http:\/\/subversion.tigris.org\/\">Subversion<\/a>, <a href=\"http:\/\/ctags.sourceforge.net\/\">ctags<\/a>, <a href=\"http:\/\/sourceware.org\/gdb\">gdb<\/a>.<\/p>\n<p><a href=\"http:\/\/samueldotj.com\/blog\/wp-content\/uploads\/2008\/09\/codelite.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/samueldotj.com\/blog\/wp-content\/uploads\/2008\/09\/codelite-150x150.jpg\" alt=\"codelite\" width=\"150\" height=\"150\" class=\"alignright size-thumbnail wp-image-131\" \/><\/a><br \/>\nSince it is advertised to have multi-platform GUI, I was little reluctant to install and try(I have tried lot of multi-platform GUI applications and never satisfied with the look and feel of them). But wxWidgets makes the CodeLite to look like native windows application. CodeLite has lot of features and it looks very similar to Microsoft VC++ IDE. <\/p>\n<p>Code browsing is very easy with CodeLite. It is has a very light explorer and also workspace view through which you can browse your project \u201ceasily\u201d. You can switch between header and c file \u201ceasily\u201d using the \u201cSwap Header\/implementation file\u201d in the context menu. Context menus \u201cGoto declaration\u201d and \u201cGoto Implementation\u201d are handy to browse through code quickly.<\/p>\n<p>If you are using cygwin and custom makefile &#8211; you can use a script as custom build command &#8211; see <a href=\"http:\/\/samueldotj.com\/blog\/?p=41\">Notepad++ as IDE<\/a> post for more details.<\/p>\n<p>I use the following command to build(because I use gcc cross compiler)<br \/>\n[shell]c:\\cygwin\\bin\\bash -l -c &#8216;cd $ACE_ROOT\/src;PATH=\/usr\/cross\/i586-elf\/bin\/:$PATH:;make 2> err; sed -e &#8220;s@\\(\\\/cygdrive\\\/\\)\\([a-zA-Z]\\)@\\2:@g&#8221; err; rm err\u2019.\u00a0[\/shell]<br \/>\nAnd the following command to clean<br \/>\n[shell]c:\\cygwin\\bin\\bash -l -c &#8216;cd $ACE_ROOT\/src;PATH=\/usr\/cross\/i586-elf\/bin\/:$PATH:;make clean\u2019[\/shell]<\/p>\n<p>Codelite supports debugging through gdb; embedded and remote targets also supported. Since I am using a emulator to test my kernel, I have to use remote debugging in GDB to test my OS. Codelite integrates well with GDB remote debugging. I use the following GDB commands as startup gdb commands.<br \/>\n[shell]<br \/>\nset print pretty on<br \/>\ndirectory src\/kernel<\/p>\n<p>symbol obj\/kernel.sys<br \/>\nsource img\/gdb\/general.gdb<\/p>\n<p>source img\/gdb\/stack.gdb<br \/>\nsource img\/gdb\/vm.gdb<br \/>\n[\/shell]<\/p>\n<p>If SVN is configured, using codelite you can see difference between two versions of a same file.<br \/>\nBy default codelite uses the default diff viewer.\u00a0<br \/>\nIt can be changed from Plugins menu -> Subversion->Options and setting the value appropriately.\u00a0<br \/>\nI use <a href=\"http:\/\/www.winmerge.org\/\">WinMerge <\/a>to see difference of source files and have the following settings:<br \/>\nExternal Diff viewer: <b>C:\\Program Files\\WinMerge\\WinMergeU.exe<\/b><br \/>\nArguments    :\u00a0<b>\/dl %bname \/dr %mname %base %mine\u00a0<\/b><\/p>\n<p>Another good thing about CodeLite is it is under development and your bug report\/feature requests are solved within short time frame.<\/p>\n<p>You can download CodeLite from <a href=\"http:\/\/www.codelite.org\/\">www.codelite.org<\/a>. It has installer for Windows and Linux also.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For my C projects I was using Notepad++ as my editor\/IDE for some time. Although notepad++ is good, it is lacking the integration with a code browser, source control and debugger. I came to know about a new IDE &#8211; CodeLitewhen I was searching for ctags for windows. It has integrated support for Subversion, ctags, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,7,14],"tags":[],"class_list":["post-28","post","type-post","status-publish","format-standard","hentry","category-c","category-softwares","category-windows"],"_links":{"self":[{"href":"http:\/\/samueldotj.com\/blog\/wp-json\/wp\/v2\/posts\/28","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/samueldotj.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/samueldotj.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/samueldotj.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/samueldotj.com\/blog\/wp-json\/wp\/v2\/comments?post=28"}],"version-history":[{"count":2,"href":"http:\/\/samueldotj.com\/blog\/wp-json\/wp\/v2\/posts\/28\/revisions"}],"predecessor-version":[{"id":132,"href":"http:\/\/samueldotj.com\/blog\/wp-json\/wp\/v2\/posts\/28\/revisions\/132"}],"wp:attachment":[{"href":"http:\/\/samueldotj.com\/blog\/wp-json\/wp\/v2\/media?parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/samueldotj.com\/blog\/wp-json\/wp\/v2\/categories?post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/samueldotj.com\/blog\/wp-json\/wp\/v2\/tags?post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}