forums.xandros.com Forum Index forums.xandros.com
Xandros User Forums
 
 FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Linux equivalent of DLL

 
Post new topic   Reply to topic    forums.xandros.com Forum Index -> Linux Devel 101
View previous topic :: View next topic  
Author Message
arka
Xplorer


Joined: 14 Jan 2006
Posts: 53
Location: Tokyo

PostPosted: Fri Apr 28, 2006 10:31 pm    Post subject: Linux equivalent of DLL Reply with quote

I want to progam a library module in C (or C++). I then want to call this module from a PHP program running on Apache.

Does Linux have anything akin to Windows DLL (Dynamically-Linked Library)? If so what are they called? Can they be called from PHP at runtime? If so, can you pass parameters to them?

I do not even know if you can call a DLL from PHP on Windows (I am a PHP newbie) so I may be jumping the gun asking these questions in the first place, but any advice is appreciated, no matter how partial or indirect.

Thanks!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sqlpython
Xanalandingdonger


Joined: 22 Sep 2005
Posts: 5040
Location: Ct. USA

PostPosted: Sat Apr 29, 2006 12:27 am    Post subject: Reply with quote

Dynamically linked libraries are nothing new nor special. The concept with terminal sytems dates back to the late 60's. It is not a Windows concept.
It really picked up steam with programmers in the 80s with OOPs like SmallTalk and later C++.

Anyway,, all it is basically is a shared or remote library that is not placed in the executable at compiled time but simply a seperate library called upon as needed.

For an example, the GNU/Linux world, look no further then your /lib or usr/lib directories and files named like libxxx.so or libxxx.a with versions and revision numbers like so..
libxxx.so.1.2 ..

In the Window's world you have libraries both static (*.lib) and dynamic (*.dll)
_________________

Criticism only accepted for Solutions that work. ;^)
RevLinux, Debian Squeeze"
Kubuntu 10.04 & 10.10
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger
drl
Xandrosianding
Xandrosianding


Joined: 20 Jan 2004
Posts: 563
Location: St Paul, Minnesota

PostPosted: Sat Apr 29, 2006 6:08 am    Post subject: Reply with quote

Hi, arka.

I read in Chapter 14 of a book I have:
Quote:
If you are just learning PHP and do not have any sort of C programming background, you should probably skip this chapter. Extension writing is an advanced topic, and is not for the faint of heart.

Programming PHP
By Rasmus Lerdorf, Kevin Tatroe

http://www.oreilly.com/catalog/progphp/index.html

There is also an O'Reilly book on PHP 5: http://www.oreilly.com/catalog/learnphp5/index.html

You might want to start with something like:
Quote:
Beginning Linux Programming, Third Edition (Paperback)
by Alan Cox (Foreword), Neil Matthew, Richard Stones "Welcome to Beginning Linux Programming, an easy-to-use guide to developing programs for the Linux and other UNIX-style operating systems..."

Beginning Linux Programming, Third Edition (Paperback)
at this link on Amazon. I have the first edition, however, so I cannot comment directly on the third edition. Generally, I like both O'Reilly and Wrox boox ( Smile ).

Best wishes ... cheers, drl
_________________
[ "Sure, I can help you with that." -- USBank voice recognition system. ]
( Mn, 3.0.3B, 2.6.11-x1, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )
Back to top
View user's profile Send private message
arka
Xplorer


Joined: 14 Jan 2006
Posts: 53
Location: Tokyo

PostPosted: Sun Jun 04, 2006 10:55 pm    Post subject: Reply with quote

Thanks sqlpython and drl!

Both of your posts are helpful. I will take a look at the suggested books as well.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.xandros.com Forum Index -> Linux Devel 101 All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group