Using ksh or perl to use a c API
#1
Scooby Regular
Thread Starter
Join Date: Sep 2001
Location: A powerslide near you
Posts: 10,261
Likes: 0
Received 0 Likes
on
0 Posts
Using ksh or perl to use a c API
Hi
Got a c api installed on unix box. Got a c program that runs some functions from the api. No problems so far. However, I wish to use the api through ksh or perl rather than c. Anyone know how? In c you just have the .h, .c files etc and 'make' them but how do I get the ksh or perl script to 'call' functions of the api?
Help.
Got a c api installed on unix box. Got a c program that runs some functions from the api. No problems so far. However, I wish to use the api through ksh or perl rather than c. Anyone know how? In c you just have the .h, .c files etc and 'make' them but how do I get the ksh or perl script to 'call' functions of the api?
Help.
#3
Scooby Regular
Join Date: Apr 2002
Location: elsewhere
Posts: 1,212
Likes: 0
Received 0 Likes
on
0 Posts
The only way to do it would be to write a small C program to call the function you require from the API and have it accept command line parameters which you can then pass to it via the shell script.
You can't do it directly as the shell interpreter can't compile a C call as it doesn't understand either the C language or how to compile it.
You can't do it directly as the shell interpreter can't compile a C call as it doesn't understand either the C language or how to compile it.
#4
Scooby Regular
Join Date: Apr 2001
Location: Hants
Posts: 1,103
Likes: 0
Received 0 Likes
on
0 Posts
#5
Scooby Regular
Thread Starter
Join Date: Sep 2001
Location: A powerslide near you
Posts: 10,261
Likes: 0
Received 0 Likes
on
0 Posts
Originally Posted by class_A
The only way to do it would be to write a small C program to call the function you require from the API and have it accept command line parameters which you can then pass to it via the shell script.
You can't do it directly as the shell interpreter can't compile a C call as it doesn't understand either the C language or how to compile it.
You can't do it directly as the shell interpreter can't compile a C call as it doesn't understand either the C language or how to compile it.
cheers.
Thread
Thread Starter
Forum
Replies
Last Post
StueyBII
Engine Management and ECU Remapping
5
22 September 2015 02:13 PM