473,395 Members | 1,595 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to call a function from a shared library ?

Hello,

I'm getting overwhelmed by information if I google this question. But
it is not clear to me. I have a shared library (.so file), created by
some other company we work with. Now I have to call a certain function
from this shared library. The declaration looks like this;

int TransformPoints(void * vel_g, void* vel_i, void* vpoints, int nb)
;

Untill now, I was using the ctypes module to access this function. The
first two parameters are arrays[0..23] of type double and the third
parameter is an array[0..2] of type double. Using the ctypes module,
this works allright.

But now I have to port this application to other platforms, and I
cannot use the ctypes module anymore (due to libffi incompatibility).
Is there another way to do this?

Any help would be greatly appreciated.

Tom
Jul 18 '05 #1
1 1639
Tom Van Acker wrote:
Hello,

I'm getting overwhelmed by information if I google this question. But
it is not clear to me. I have a shared library (.so file), created by
some other company we work with. Now I have to call a certain function
from this shared library. The declaration looks like this;

int TransformPoints(void * vel_g, void* vel_i, void* vpoints, int nb)
;

Untill now, I was using the ctypes module to access this function. The
first two parameters are arrays[0..23] of type double and the third
parameter is an array[0..2] of type double. Using the ctypes module,
this works allright.

But now I have to port this application to other platforms, and I
cannot use the ctypes module anymore (due to libffi incompatibility).
Is there another way to do this?

Any help would be greatly appreciated.

Tom


Maybe Pyrex (http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/).
--
Nigel Rowe
A pox upon the spammers that make me write my address like..
rho (snail) swiftdsl (stop) com (stop) au
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Pawan Narula via DotNetMonster.com | last post by:
hi all, i'm using VB.NET and trying to code for contact management in a tree. all my contacts r saved in a text file and my C dll reads them one by one and sends to VB callback in a sync mode...
19
by: Gary Kahrau | last post by:
I want to create a function and can only get half way to my goal. dim sStr as string sStr = Entry(2,"a,b,c,d") ' Sets sStr = "b" Entry(2,sStr) = "B" ' Sets sStr = "a,B,c,d"...
0
by: zztlhb | last post by:
Hi, I currently hit an issue that I would like to use a function statically linked to a shared library but my program use the same function from another shared library. Here is what I do: 1. I...
2
by: Serman D. | last post by:
Hi all, I'm trying to complete the samples from the excellent 2003 developerWorks article "Bringing the Power of Regular Expression Matching to SQL" by Knut Stolze: http://tinyurl.com/3bhrnn...
3
by: santus | last post by:
i try to call a matlab generated shared library from C# for stand alone application. the m file: function hi=timestwo(t,h,i) hi=2*t+2*h+2*i; public static extern void mlfTimestwo(int num,...
7
by: =?Utf-8?B?c2lwcHl1Y29ubg==?= | last post by:
Hi I am trying to see if I can call a Library remotely. The library contains a Form that I want to display then pass back some data to user that called this form remotely. I have it working...
2
by: Gillard | last post by:
hello I get a dll with standard call in C ++ but I really do not know how to use it in VB anyone can help??? there is the declarations in cpp to use the functions #ifndef SFPDF_H #define...
1
by: Ahmad Jalil Qarshi | last post by:
Hi, I am develop a dynamic link library in C on AIX that will internally call java functions using JNI. This libaray will be finally used by other C Executable. There is only one function in...
0
ashitpro
by: ashitpro | last post by:
Writing System Call Wrappers in User Space. Recently I saw a post in Linux/Unix section to know the user who deleted the file in linux. Currently there is nothing in linux which could achieve...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.