creating .so files

creating .so files

Post by Ryan Hop » Wed, 23 Sep 1998 04:00:00



Sun folks,

I am interested in creating some shared libraries to be executed on a
Solaris box.  I believe that the files which I need to create are called
.so files, but I can't find much information on them.  Can anyone point
me in the right direction?

If you are interested, the reason I need to create theses files is to
enable a ColdFusion application to make system calls, which will in turn
talk to a Netscape directory server (via LDAP) for authentication
purposes.  Presumably, these shared libraries could also be used in Perl
scripts for a similar function.

Any help would be greatly appreciated.

Ryan Hope

 
 
 

creating .so files

Post by Bob Henn » Thu, 24 Sep 1998 04:00:00


Do a man on ld.

Specifically, check out the -G option for creating shared libraries.

Also, if you're using the Sunsoft C/C++ compilers, you need to use the -KPIC
option on your compiles.

--
Bob

|> Sun folks,
|>
|> I am interested in creating some shared libraries to be executed on a
|> Solaris box.  I believe that the files which I need to create are called
|> .so files, but I can't find much information on them.  Can anyone point
|> me in the right direction?
|>
|> If you are interested, the reason I need to create theses files is to
|> enable a ColdFusion application to make system calls, which will in turn
|> talk to a Netscape directory server (via LDAP) for authentication
|> purposes.  Presumably, these shared libraries could also be used in Perl
|> scripts for a similar function.
|>
|> Any help would be greatly appreciated.
|>
|> Ryan Hope

|>

 
 
 

creating .so files

Post by Rod Eva » Thu, 24 Sep 1998 04:00:00



Quote:>I am interested in creating some shared libraries to be executed on a
>Solaris box.  I believe that the files which I need to create are called
>..so files, but I can't find much information on them.  Can anyone point
>me in the right direction?

Check out the Linker and Libraries Guide (part of the Software Developer
Collection in the Answerbook).  Start with the chapter "Link-Editor
Quick Reference", it'll give you an overview of the objects ld(1) can
create.

Rod.

 
 
 

creating .so files

Post by Eduardo Pinheir » Sat, 26 Sep 1998 04:00:00



> Sun folks,

> I am interested in creating some shared libraries to be executed on a
> Solaris box.  I believe that the files which I need to create are called
> .so files, but I can't find much information on them.  Can anyone point
> me in the right direction?

        Compile you .c file using gcc (or cc) with the -c flag.
        This generates a .o object file. Then link all your .o
        files using

                ld -dy -G -o <sharedlibname> <list of objects .o>

        ld is the linker. Option -dy enables dynamic mode and -G
        creates shared libraries. It's as simple as that.

        In order to use a shared library, it must reside on
        /usr/lib or you must have the environment variable
        LD_LIBRARY_PATH pointing to where the library should be.
        There is still another way around it: you can compile your
        applications using the -R flag. -R <path> tells the linker
        where to find the shared library when it's needed (this
        path is included in the executable code).

        If you ever find a way to append objects to a shared
        library, please tell me.

        Hope this helps,

                                        Eduardo Pinheiro

 
 
 

1. ftpd, default file permissions on creating a file on Solaris, SunOS 5.5.1

I have the following problem:

When I connect with ftp to a machine running SunOS 5.5.1 all the files
which I put on that machine get the following file permissions set
-rw-r--r-- :

-rw-r--r--    1    username    usergrp    1889    Mar    27    10:41
test.txt

Is there any way this default setting can be changed? If yes, how?

On the machine with SunOS 5.5.1 I have the ftpd configured as follows in
the inetd.conf:

ftp    stream    tcp    nowait    root    /usr/sbin/in.ftpd    in.ftpd
-l -t900

On an AIX 4.1.5 systems there is an extra option which can be specified
with the ftpd called -u<umask>. This is the umask which will be used by
the ftpd.
There is nothing mentioned about the -u option in the man pages of
Solaris.

Any help is welcome.

Michel Verbraak.
UNIX/Oracle/Web systems manager.
Shell Services International, Randstad Services.

2. How do I parse variables???

3. Can I create a file desriptor to a file mapped into memory?

4. Ultrastor 34F

5. How to create a file system inside a file ?

6. syslogd segmentation fault

7. Can't create lock file /etc/mtab~ :File exists ????????

8. Starting up programs in X?

9. Create batch file and send screen output to a file

10. Named doesnt create cash files

11. Creating bff files...

12. how do I create this file? (spx)

13. Error creating crontab file