First off all , let me apologize for my inexperience. I am just starting use of Linux and gcc .
Actually I ve some .c files in the present directory , and now I am
giving
All the c files are in present directory. Then my Vcs Tool automatically calls the gcc command for me ..
Like
But my problem is I want to store all these .c files in a src directory and call it from there..But not using absolute path name for all files..
I guess there -Idir/Ldir for directory search , But I tried seems to be not working .
Thanks for your help..
Regards,
Last edited by vino; 02-12-2008 at 05:26 AM..
Reason: arranged the code tags
Hi mates,
I am trying to copile and link to C programs with command:
cc file1,file2
but i raises the error "file not found" ... am i doing the right way?
any suggestion will be appreciated.
thanks
abdul (4 Replies)
hi there
can anyone tell me how to search and copy files under unix?
im writing shell scripts with 'vi' and 'pico'
something like
read directoryName
if
then
echo Copying the files
copy those *.src files to sub1(another directory) using cp
else
... (4 Replies)
Hi
I'm getting
ld: fatal: option -h and building a dynamic executable are incompatible
ld: fatal: Flags processing errors
When I run
ld -shared -L/usr/dt/lib -lDtSvc -o builtin.so Workspace.o
after running
gcc -fPIC -I/usr/X11R6/include -I/usr/dt/include -c Workspace.c
I'm... (6 Replies)
hi,
This is the first time I work in a big C project. All source code files are located in say directory /source/pp and all header files are in /include/pp. I've created a link to both of these directories from my home dir, say /home/ss. So in the /home/ss dir I have the /source/pp and /include/pp... (1 Reply)
Hello,
Can anyone tell me how I can make a file link or shortcut in UNIX 4.0, several
file links where damaged during an outage examples below.
Examples: file -> file
libX11.so -> /usr/shlib/libX11.so.pre.O3D
All of the file links that were damaged were in /shlib and point to... (3 Replies)
I used to program ksh a while back, but I've been off in Oracle/Windows land (for clients -- not by choice) for so long that I can't remember what should be an easy thing. Here's the scenario:
1)Find all files and directories beneath some directory point (A).
2)If directory, make the... (7 Replies)
Hi, I have the following command to list files beginning with a specific name and containing some text...
find . -type f -name "dm_merge_domain_adm*" -exec grep -il "Error Message:" '{}' \; -print|xargs ls -ltr
It works fine, but seems to list two of each file, when they only exist once...any... (1 Reply)
I have a list of pattern in a file, I want each of these pattern been searched from 4 files. I was wondering this can be done in SED / AWK.
say my 4 files to be searched are
> cat f1
abc/x(12) 1
abc/x 3
cde 2
zzz 3
fdf 4
> cat f2
fdf 4
cde 3
abc 2... (6 Replies)
I have 2 txt files, 1.txt and 2.txt which contain the paths to files that need to be linked.
Example 1.txt:
/root/001/folder2/image4.nii.gz
/root/002/folder2/image4.nii.gz
Example 2.txt:
/root/001/folder2/image5.nii.gz
/root/002/folder2/image5.nii.gz
Each line represents images from... (7 Replies)
Basically my problem is that when I try to compile anything using ./configure && make, it fails because of linker errors. I can reproduce the behavior I'm getting as follows:
I have the two following files
main.c:
#include <stdio.h>
extern void func(void);
int
main(int argc, char... (5 Replies)
Discussion started by: MarshallBanana
5 Replies
LEARN ABOUT DEBIAN
trampoline
TRAMPOLINE(3) Library Functions Manual TRAMPOLINE(3)NAME
trampoline - closures as first-class C functions
SYNOPSIS
#include <trampoline.h>
function = alloc_trampoline(address, variable, data);
free_trampoline(function);
is_trampoline(function)
trampoline_address(function)
trampoline_variable(function)
trampoline_data(function)
DESCRIPTION
These functions implement closures as first-class C functions. A closure consists of a regular C function and a piece of data which gets
passed to the C function when the closure is called.
Closures as first-class C functions means that they fit into a function pointer and can be called exactly like any other C function. func-
tion = alloc_trampoline(address, variable, data) allocates a closure. When function gets called, it stores data in the variable variable
and calls the C function at address. The function at address is responsible for fetching data out of variable immediately, before execu-
tion of any other function call.
This is much like gcc's local functions, except that the GNU C local functions have dynamic extent (i.e. are deallocated when the creating
function returns), while trampoline provides functions with indefinite extent: function is only deallocated when free_trampoline(function)
is called.
is_trampoline(function) checks whether the C function function was produced by a call to alloc_trampoline. If this returns true, the argu-
ments given to alloc_trampoline can be retrieved:
trampoline_address(function) returns address,
trampoline_variable(function) returns variable,
trampoline_data(function) returns data.
SEE ALSO gcc(1), varargs(3), callback(3)BUGS
Passing the data through a global variable is not reentrant. Don't call trampoline functions from within signal handlers. This is fixed in
the callback(3) package.
PORTING
The way gcc builds local functions is described in the gcc source, file gcc-2.6.3/config/cpu/cpu.h.
AUTHOR
Bruno Haible <bruno@clisp.org>
ACKNOWLEDGEMENTS
Many ideas were cribbed from the gcc source.
25 October 1997 TRAMPOLINE(3)