PDA

View Full Version : Parsing and importing a dll in Qt4



theBrave
10th May 2006, 09:44
Hello,

I have to work on a data acquisition program. My programs acquire and display data, but it relies on external libraries to process data. So my main problem now is finding a cross-platform way to load a library and parse its exported functions so the user could choose a function and select its parameters.

I've looked at the documentation and QLibrary only seems to be able to resolve a known function.

Since it's a user library, I can't be sure of the language it was programmed in. (Let's assume it's C++ without Qt)

Thanks

e8johan
10th May 2006, 11:07
QLibrary is the way to go and you must assume a language, or rather, a call strategy.

Chicken Blood Machine
10th May 2006, 17:25
QLibrary is the way to go and you must assume a language, or rather, a call strategy.

Since the library is in C++, you are going to have to mangle the function names in order to resolve them too. You need to Google for this because it's very compiler/linker-specific. I don't envy-you!:crying:

theBrave
12th May 2006, 13:53
Well, if it is impossible to search for function names in dll, is it possible lo let the user enter the prototype of the function to call ?
I want to allow user to select how many parameters (and to let them specify types) the external function will accept. I guess I can't use typedef... Any ideas on how doing that ?