-   Linux - Newbie (
-   -   how to make a shared libraries in linux terminal (

nodar 01-18-2008 04:52 AM

how to make a shared libraries in linux terminal
Hi Folks,

I have these .cpp source codes and I want to make a shared library out of these using the linux terminal. Anyone knows how to do it?

Also, on how to compile c++ sources, build shared libraries and write makefiles. (Doing all these in the linux terminal)

All replies are greatly appreciated

thank you,


anupamsr 01-18-2008 05:59 AM

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 ( )

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:

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.

All times are GMT -5. The time now is 02:19 PM.