Code::Block Usage Under Ubuntu

Code::Block is a C/C++ IDE that could run on different OS, Windows, Linux and Mac OS. Comparing to the VS under the windows, it is less powerful. But it will help you a lots, and improve the your work efficient if you were not an Linux coding expert. Graphics IDE always appear a lots of charming compared to the white text and black ground window. 

 

File –> New –> Project

A new project could be created as the above menu selection path.
open_projects 
Too many project templates, right? But do not worry, each template is just a “HelloWord”sample. You could code your project as many feature as more as possible.

 

Add Include directory, “Project”->”Build Option”

include_dir

 

Add link libraries directory, Project-> Build Options:

lib_dir

 

Add link libraries, Project –> Build Options:

link_lib

 

Add Pre-process Macros, Project –> Build Options:

macro

 

Goto File, Alt + G

goto_file

 

Something more
  • a) On the Ubuntu OS, the file path is case sensitive; The file path in #include command is case sensitive in Code::Block;
  • b) Do not mix .cpp and .c source files in Code::Block project. Otherwise you will come across some strange function calling link errors. You will see a error happen when you use a std::vector in a .c source file.
  • c) Do not add suffix for link libraries. For example, when you want to link OpenGL library, you need to add libGL instead of libGL.so.
posted @ 2013-01-26 16:07  opencoder  阅读(240)  评论(0编辑  收藏  举报