P
P
Pavel K2018-12-18 00:23:40
linux
Pavel K, 2018-12-18 00:23:40

How to make a wrapper for Wine over a library that would call the Linux version of this library?

Greetings!
In general, there is a program that works with the equipment through the library,
launched the program itself under Wine, but there is a problem with the equipment, because. Wine still can't work properly with USB.
I found a version of this library for Linux, created the simplest program in c ++, which pulls functions from the Linux library and the equipment responds to it.
Now you need to somehow force Wine to load, uh, the Linux version of the libraries, but I think that due to the difference in principles
, this will not work directly, so we need some kind of "layer" that intercepts calls to native library functions and would call the Linux version.
Interested in how to write this "layer"? Could you tell me, please, is there a ready manual? Or at least googling...
PS There is a header file for the library itself.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
P
Pavel K, 2018-12-18
@PavelK

Found in the documentation, point 5
https://wiki.winehq.org/Winelib_User%27s_Guide

S
Stanislav Makarov, 2018-12-18
@Nipheris

Why make it so difficult? Linux library - in a separate daemon process, and communicate with it on unix / network sockets.
Or is the source code of the main program not available?

T
Tailan Daribaev, 2018-12-18
@tailan

I would suggest:
1. Recompiling the main program under Linux
2. You can make an http client that will work with the equipment and then interact with it (here you can say that the master knows a lot about perversions)))
The first option is preferable.

A
Alexander Taratin, 2018-12-18
@Taraflex

Replace the library with a self-written (windows) one, which will communicate with a background Linux program via some rpc (which will directly make system calls).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question