Mix and match libraries

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
mqguy
Level 1
Level 1
Posts: 7
Joined: Wed Sep 18, 2013 11:02 am

Mix and match libraries

Post by mqguy »

My apologies if this is explained somewhere but I've been through the FAQ and done Google searches etc and I can't see the answer. Perhaps the answer is too obviously 'no'.

What I was wondering was whether it is possible to mix the shared libraries in WINE. Let's say I have a program PROG which loads a DLL on Windows called XYZ.DLL. Now, I can copy the DLL over to my Linux box and run program PROG just fine. However, the Linux box already has a Unix version of the DLL called XYZ.so file installed and there would be significant advantages in my Windows program loading and calling that one. Is this possible at all ? Or does the entire stack have to be Windows code.

Any help would be appreciated ?

Cheers,
P.
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: Mix and match libraries

Post by dimesio »

mqguy
Level 1
Level 1
Posts: 7
Joined: Wed Sep 18, 2013 11:02 am

Re: Mix and match libraries

Post by mqguy »

Thanks for that somewhat brief reply. Perhaps I should have mentioned that I had found, and read, the winelib documentation but when you are new to a subject it is always possible that you haven't absorbed all the possibilities. My understanding of winelib is that it requires that I write another C part and build yet another object etc etc. While this is doable it still feels less than ideal. If one wrote a spec file it feels, to me anyway, as though that 'could' be enough. That as long as WINE knows the DLL mapping and the function mapping there would be no need to actually write a wrapping layer and construct an actual physical DLL, WINE could do all that for you. WINE is a very impressive bit of software and it feels as though this would be trivial by comparison.

Anyway, thanks again, I hope I interpreted your answer correctly, which was 'no, you can only do it this way',

P.
mqguy
Level 1
Level 1
Posts: 7
Joined: Wed Sep 18, 2013 11:02 am

Re: Mix and match libraries

Post by mqguy »

Well, perhaps I spoke too quickly. I had assumed, since there was a manual which described the process, that I would be able to follow it and produce a library. However, this seems not to be so. As you may be able to tell I am a Windows user, I am used to being spoon fed the information I need as though I was an idiot, which, frankly is quite reassuring. However, now I'm in the Unix world. The Unix world is more 'here are four or five commands you'll need in some order or other, with thousands of options, some of those you'll also need, but for heaven sake don't do this, or that, otherwise things will go wrong and if they do go wrong we'll be sure to give you are really, really misleading message to set you on your way.....or possibly not!'

Just installing Wine was an absolute mission. I had to install and configure different repositories. Install rpms, make updates to my system. Install compatible packages (which I got wrong once and had to re-install my OS !) I'm using Centos 6.4 by the way. Which only seems 'sort of' supported. Anyway, I eventually managed to install WINE but it took me an entire day of installing/configuring/re-installing etc. I failed miserably at trying to build it....WINE kept saying I had no 32bit compiler which I believe I do. Anyway although I have wine on my machine, I don't seem to have winebuild but I do have winemaker. I tried to install wine-devel but this was an entire guess since I couldn't find any documentation on where winebuild is supposed to be. However, needless to say wine-devel won't install, it can't find a dependency of some sort. So, I thought I'd try pointing winemaker at my C part and spec file. However, as usual, the manual is appalling at telling you what you are supposed to do. It throws a few command line options at you and expects you to fill in the rest. What's wrong with a few working examples ?

I have now 'wasted' two days on trying to get my program running on Linux. I think, for the sake of my health, perhaps the best thing for me to do is forget that Linux exists and go back to the safety of Windows where things actually work. Trying to do anything other that the most vanilla stuff in Unix should only be undertaken by people with huge amounts of patience, a strong heart, a trial-by-error attitude and more time on their hands than is healthy. The users of my program can stick with Windows, I'm not sure that saying they can also use Unix would be a kind thing to do.
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: Mix and match libraries

Post by dimesio »

Sorry you had such a hard time. Part of the reason for your problems installing Wine stems from general inexperience with Linux, and part is due to your choice of distro. The learning curve is inevitable, and IMO, users should spend some time familiarizing themselves with the basics of their new OS before attempting to use Wine. As for your choice of distro, as you note, CentOS has poor support for Wine. It's much easier to install Wine on one of the major distros that provide up-to-date packages (openSUSE, Fedora, Ubuntu, Arch).

As for getting your program to run in Wine, your initial post makes it sound like it does work in Wine, but just needs a particular native dll copied over. Is that correct? What dll is it? If it's a dll that ships with Windows, and Wine doesn't implement it yet, or Wine's implementation doesn't work, you should file a bug here. If it's a dll specific to your app, then your app should install it, and Wine should be able to use it without any tweaking on the part of the user.
mqguy
Level 1
Level 1
Posts: 7
Joined: Wed Sep 18, 2013 11:02 am

Re: Mix and match libraries

Post by mqguy »

Thanks for your response. I think that is one of the major problems us non-Unix types have with Unix. There are just so many to choose from. All different and yet similar enough to confuse you. I can't remember quite why I picked CentOS now apart from it has good compatibility with RedHat and is free. I just want to play at creating a few tools, I don't want to spend money on a full OS. I did have a play with Ubuntu for a while but for some reason decided it wasn't for me. Perhaps I should take another look or try Fedora.

The DLL in question is not a Windows DLL but a shared library that is shipped as part of another licensed product which my program interfaces with.
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: Mix and match libraries

Post by dimesio »

You might want to ask what you can do about the dll on the developer's list.
mqguy
Level 1
Level 1
Posts: 7
Joined: Wed Sep 18, 2013 11:02 am

Re: Mix and match libraries

Post by mqguy »

Sorry, I have no idea what the 'developers list' is. There appear to be 3 forums and this seemed the most appropriate.

Anyway, I have now installed Fedora and I have managed (although not without a lot of problems) to install WINE and WINE-DEVEL on that machine. The next hurdle, of course, is trying to work out how to use the WINEBUILD command. It is honestly like the documentation has been written with the authors having no real intention of anyone using it. The manual just reads like a long list of options and flags. Doesn't anyone in the Unix believe in worked examples ? Do you 'want' people to use this stuff?. A Google search also came up empty although I did find lots of other people asking how on earth you use the winebuild command.

I assume that all of you at WINE have put a large amount of effort in your work and one can only applaud that. It must be a very interesting technical challenge. But surely the ultimate goal is to have lots of people use it. For that the key thing is usability. Make it as usable as possible and your user count will increase. Unix has a reputation for being a 'hackers' platform and I am only in the last few days beginning to realise just how true that is.

I have spent most of this morning fighting with winebuild. I have got to the point where I am more or less trying each option just to see what it does. However, whatever I do it just seems to spit out an assembler file at me. What on earth do I do with that? Why should it be this hard?

I'm now into my 3rd day of this saga. What I honestly thought would take me a couple of hours. Quite incredible.
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: Mix and match libraries

Post by dimesio »

I meant the developer's mailing list. http://www.winehq.org/site/forums

Your question about whether there is some other way besides winelib to do what you want is really a developer's question. This is the user's forum, and what you are trying to do is not something ordinary users would ever do. Winelib "users" are developers, and that's the audience that the Winelib User's Guide is aimed at. I can't help you with any problems with it, because I am not a developer.
Locked