Sponsored Content
Full Discussion: compile funtion
Top Forums Programming compile funtion Post 14067 by sundarm on Monday 28th of January 2002 05:42:07 AM
Old 01-28-2002
Network

You wrote :
Sometimes, with larger projects, you will want to compile a function separately. You can use the -c flag to do this.
----

Basically i do some plug-in in ksh. what you said is correct, i am using ksh-88 only.

In my project, I need to write some tools(functions) in C and compile a function separately, and then call that funtion's executables in ksh script.

I have included -c flag in cc. but it is generating object files only

like

$ cc -c seq.c
$
$
$ cat seq.c

#include <stdio.h>
seq(num)
int num;
{
int i,sum;
for (i=1; i<=num;i++)
sum+=i;
return(sum);
}
$ ll seq*
-rw-rw-r-- 1 ict ict 99 Jan 23 17:16 seq.c
-rw-rw-r-- 1 ict ict 576 Jan 28 09:47 seq.o

Can you please help out in this problem. how can i make executables using this. I hope, this might be very simple thing for you.

Thanks lot.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

i see "{}" in various commands around here what is there funtion?

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

Delete funtion

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

Unable to use funtion keys with Kea term

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

Hash Funtion properties

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

help to compile

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

Shell Script not working using for loop and a funtion

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

Compiling gcc to compile make to compile yaboot

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

how to check/display/edit funtion

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

multiple looping with case and funtion showing error, Please help

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

find -exec How to add additional parameter when calling a funtion

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
SEQ(1)							    BSD General Commands Manual 						    SEQ(1)

NAME
seq -- print sequences of numbers SYNOPSIS
seq [-w] [-f format] [-s string] [-t string] [first [incr]] last DESCRIPTION
The seq utility prints a sequence of numbers, one per line (default), from first (default 1), to near last as possible, in increments of incr (default 1). When first is larger than last the default incr is -1. All numbers are interpreted as floating point. Normally integer values are printed as decimal integers. The seq utility accepts the following options: -f format Use a printf(3) style format to print each number. Only the E, e, f, G, g, and % conversion characters are valid, along with any optional flags and an optional numeric minimum field width or precision. The format can contain character escape sequences in backslash notation as defined in ANSI X3.159-1989 (``ANSI C89''). The default is %g. -s string Use string to separate numbers. The string can contain character escape sequences in backslash notation as defined in ANSI X3.159-1989 (``ANSI C89''). The default is . -t string Use string to terminate sequence of numbers. The string can contain character escape sequences in backslash notation as defined in ANSI X3.159-1989 (``ANSI C89''). This option is useful when the default separator does not contain a . -w Equalize the widths of all numbers by padding with zeros as necessary. This option has no effect with the -f option. If any sequence numbers will be printed in exponential notation, the default conversion is changed to %e. The seq utility exits 0 on success and non-zero if an error occurs. EXAMPLES
# seq 1 3 1 2 3 # seq 3 1 3 2 1 # seq -w 0 .05 .1 0.00 0.05 0.10 SEE ALSO
jot(1), printf(1), printf(3) HISTORY
The seq command first appeared in Plan 9 from Bell Labs. A seq command appeared in NetBSD 3.0, and ported to FreeBSD 9.0. This command was based on the command of the same name in Plan 9 from Bell Labs and the GNU core utilities. The GNU seq command first appeared in the 1.13 shell utilities release. BUGS
The -w option does not handle the transition from pure floating point to exponent representation very well. The seq command is not bug for bug compatible with the Plan 9 from Bell Labs or GNU versions of seq. BSD
February 19, 2010 BSD
All times are GMT -4. The time now is 12:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy