02-01-2002
It is not very clear what you are trying to do. Is that you want to create a separate library with functions and then have an executable calling them, or the difficult endeavour to encapsulate the code as "internal" ksh commands?.
If it is the first, you just have to use "gcc -c" to create an object file from your functions source file test.c (i.e. test.o). Then use gcc -shared -o libname.so test.o to get your libname.so shared library file. Put it in the dir /lib. Then whenever you compile any new source .c file you make you have to compile with the -lname directive. Before you have to issue the ldopen() command. This is very simplified and you have to consult books how to do it exactly, it was just an example to show you the flow.
If it is the 2nd case, it much more difficult than this as Perderabo stated, but it includes recompiling sdt OS shared libraries with specific format (I have never done it). If still this is your interest, I suggest you play around with tcsh, a shell you can find the code on the net and will not interfere with standard OS shells.
Hope
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
IE:
find / -type f -exec grep email@host {} /dev/null \;
or
find /home/domains/*/ -type d -exec chmod 777 {} \;
is the {} \; part of the -type funciton?
this is what i understand about the following commands.
1) start the find at the root dir.
a) only looking for flatfiles
b)... (4 Replies)
Discussion started by: Optimus_P
4 Replies
2. Post Here to Contact Site Administrators and Moderators
Neo,
eariler today i had tossed up a post then realized i didnt want it up so i tried to delete it and it wouldnt let me. is this a functionality that you have active? To allow a user to delete any topic they started would be a great thing, i think it will also help on not haveing double posts... (2 Replies)
Discussion started by: Optimus_P
2 Replies
3. SCO
Hi
I have a server SCO_SV mantrak 3.2 5.0.5 i386
and i use a terminal emulator called Kea 420 term !
when i log in to the session i am unable to use the funtions keys
then i reset the server and works fine just some minutes
any comment ?
i really apreciate your help
regards... (1 Reply)
Discussion started by: Rdavila
1 Replies
4. Cybersecurity
Here are some desirable properties for cryptographic hash functions:
These properties below are generally considered prerequisites:
* Preimage resistant: given h it should be hard to find any m such that h = hash(m).
* Second preimage resistant: given an input m1, it should be hard... (1 Reply)
Discussion started by: newkidintown
1 Replies
5. Programming
Hello everybody,
I have a small opensource project http://hpaftpd.sourceforge.net (single-threaded ftp-server). It tested with FreeBSD and Linux. Can anybody try it with another UNIX system ? I'm interesting about HP/UX and Solaris. I would very much appreciate receiving any results about it.
... (2 Replies)
Discussion started by: wwwdev
2 Replies
6. Shell Programming and Scripting
Hi-
Here is the shell script that for some reason is not returning results:
#! /bin/ksh -
avg() {
AVG=0
typeset SUM=0
if
then
echo "You must have at least two numbers"
else
for NUM in "$*"
do
... (2 Replies)
Discussion started by: koomba
2 Replies
7. UNIX for Dummies Questions & Answers
I have just installed OpenBSD on a 333MHz PPC iMac G3. It has a 6GB HDD that has been partitioned as 1GB MacOS 8.5.1, 3GB MacOS X 10.3.9, 2GB OpenBSD 4.8. I now need to install a bootloader so that my computer can recognize the OpenBSD partition at startup. I have been trying to install... (0 Replies)
Discussion started by: t04st3r
0 Replies
8. Shell Programming and Scripting
Hi,
I have this output:
$ type msq
msq is a function
I thought it an alias, can you tell me how to I can find this function and where ?
Thanks for help. I'm on RH and HP-UX
Best
T
Continued here (0 Replies)
Discussion started by: trento17
0 Replies
9. Shell Programming and Scripting
Hello All,
I have code as follows :-
while true do
{opening a case1 statement}
1)
{opening another case2 statement}
{closing case 2}
2)
Showing error for "2)" as Syntax error at line 59 : `)' is not expected.
*)
{closing case 1}
... (5 Replies)
Discussion started by: Renjesh
5 Replies
10. Shell Programming and Scripting
Hello
Current working script is :
#
# my_script BEGIN
#
function a_function {
FIRST_PARAM="$1"
DO_SOMETHING "$FIRST_PARAM"
}
export -f a_function
START_HERE="/home/some_user/Documents"
find $START_HERE" -exec bash -c 'a_function "$0" ' {} \; (5 Replies)
Discussion started by: jcdole
5 Replies
LEARN ABOUT DEBIAN
dssi_analyse_plugin
dssi_analyse_plugin(1) General Commands Manual dssi_analyse_plugin(1)
NAME
dssi_analyse_plugin - describe a DSSI plugin
SYNOPSIS
dssi_analyse_plugin [-v|--verbose] [path]<libname>[:<label>]
DESCRIPTION
dssi_analyse_plugin lists information about DSSI plugins within a specified DSSI shared library libname. If label is given, only informa-
tion for the plugin labeled label will be listed, otherwise, all plugins in the shared library will be listed. If path is not given, the
shared library is searched for in the colon-separated list of directories specified in the environment variable DSSI_PATH.
OPTIONS
-v
--verbose
Causes dssi_analyse_plugin to be more verbose in its reporting. In particular, it will list the default program names for each plug-
in, if any.
EXAMPLES
The following command will show information about all of the plugins in the shared library /usr/local/lib/dssi/calf.so, including default
program names:
$ dssi_analyse_plugin -v /usr/local/lib/dssi/calf.so
The following command will look for the shared library trivial_sampler.so using DSSI_PATH, and display information about the mono_sampler
plugin:
$ dssi_analyse_plugin trivial_sampler.so:mono_sampler
ENVIRONMENT
DSSI_PATH
A colon-separated list of directories to scan for DSSI plugins.
CONFORMING TO
DSSI RFC version 1.0.
SEE ALSO
dssi_list_plugins(1), http://dssi.sourceforge.net/
June 23rd, 2010 dssi_analyse_plugin(1)