You can do everything in a terminal. Because all you need to write code is editor and there are plenty of editors for terminal.
As I guess you are a newbie, try PICO (
http://en.wikipedia.org/wiki/Pico_(text_editor) )
Once you feel that you are being held back by its limitations, you can learn VIM or EMACS (try both, whichever looks better to you). On Windows you have EDIT.COM.
To compile source code, you need compiler. On linux systems people exclusively use GNU GCC package, generally referred to as gcc, which is its the standard C compiler. For C++, it is g++.
To create shared libraries, you need to write source code. If you have source code, generally you compile it by giving flags:
Code:
gcc -shared -shared-libgcc sourcode.c -o output
Have a look at gcc man page for more information about how to create shared libraries (I don't know myself actually, since I am a Java/Fortran guy).
GNU Makefile is fairly easy and also very powerful tool. For them you need to read tutorials. Internet is filled with newbie tutorials.