LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-18-2008, 04:52 AM   #1
nodar
LQ Newbie
 
Registered: Dec 2007
Posts: 19

Rep: Reputation: 0
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,

nodar
 
Old 01-18-2008, 05:59 AM   #2
anupamsr
Member
 
Registered: Sep 2004
Location: India
Distribution: Kubuntu, Archlinux, Suse, Gentoo, Mandrake
Posts: 371

Rep: Reputation: 30
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.

Last edited by anupamsr; 01-18-2008 at 06:00 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error while loading shared libraries: libstdc++.so.5: cannot open shared object file: Franziss Linux - Newbie 10 06-28-2010 05:47 AM
how to tell make where to search for shared libraries? tramni1980 Slackware 16 03-31-2007 06:04 AM
error while loading shared libraries: libgvc.so.3: cannot open shared object file coolrock Slackware 6 01-17-2007 05:10 PM
error while loading shared libraries: libdb-4.1.so: cannot open shared object file putquery8581 Linux - Software 1 10-01-2004 07:03 AM
linux init error in loading shared shared libraries akaran Linux - Software 1 05-28-2003 04:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration