Newbie question - how to know which libraries to install

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
duke_chester99
Newbie
Newbie
Posts: 3
Joined: Fri Mar 12, 2021 7:36 am

Newbie question - how to know which libraries to install

Post by duke_chester99 »

Newbie here. I've used wine many times (usually with Q4Wine or winetricks) to install apps. Of course, some worked, some failed. I've been trying to understand what to do. In that light, many people (and listed apps) indicate that additional libraries have to be installed. Two questions - are these libraries installed with wine or with the app? And, how can I tell which libraries to install?

Thanks
jkfloris
Level 12
Level 12
Posts: 3136
Joined: Thu Aug 14, 2014 10:10 am

Re: Newbie question - how to know which libraries to install

Post by jkfloris »

are these libraries installed with wine or with the app?
Wine tries to mimic a Windows installation. If a DLL file appears in a standard Windows installation, Wine (usually) has its own variant of it. Other DLL files should be included with the program. Wine installs those files into the "fake" Windows. Wine is (not yet) perfect. Therefore, it may happen that a Wine DLL file does not work well enough. Then it may help to install the Windows variant of that DLL file. But this can also destroy your "fake" Windows installation (wineprefix). So use a separate wineprefix if you are experimenting with this.
how can I tell which libraries to install?
Start the program from the command line. This will allow you to see messages from Wine that may help troubleshoot problems.

For example:

Code: Select all

wine program.exe
err:module:import_dll Library MFC42.DLL (which is needed by L"program.exe") not found
In this case, mfc42.dll (from Visual C++ 6) is missing. You can install this file with winetricks:

Code: Select all

winetricks -q mfc42
In other cases, Wine's output will not be as clear, but it is often possible to see where the error is. For example, If there is an error in the .Net framework you will see mscoree error messages.
duke_chester99
Newbie
Newbie
Posts: 3
Joined: Fri Mar 12, 2021 7:36 am

Re: Newbie question - how to know which libraries to install

Post by duke_chester99 »

Thanks jkfloris! Your response is exactly the kind of answer I was hoping for.
User avatar
alexis92
Level 1
Level 1
Posts: 7
Joined: Thu Apr 28, 2022 7:53 am

Re: Newbie question - how to know which libraries to install

Post by alexis92 »

While we're on the subject (and since I'm a total newbie too), a couple of questions about the winetricks command. What does the -q argument specify? And also, is winetricks like the cure-all for any missing .dll files needed for an application?
jkfloris
Level 12
Level 12
Posts: 3136
Joined: Thu Aug 14, 2014 10:10 am

Re: Newbie question - how to know which libraries to install

Post by jkfloris »

The '-q' option in winetricks provides a quiet installation. No questions are asked.
For some verbs (the DLL or programs that winetricks can install) this option does not matter, because the DLL file is only extracted from the Windows 7 SP1 file and installed in Wine. For others, such as the .Net Framework, it saves clicking "next" several times. Sometimes it can happen that a verb can be installed in the quiet mode, but the installation fails when done manually.

Winetricks can install the most common DLL files. (And of course only those that work with Wine) You can find all available DLL files with:

Code: Select all

winetricks dlls list
User avatar
alexis92
Level 1
Level 1
Posts: 7
Joined: Thu Apr 28, 2022 7:53 am

Re: Newbie question - how to know which libraries to install

Post by alexis92 »

Got it! I also found the winetricks wiki (which I should've looked up a long time ago to be fair), so I'll try and make use of that too. Thanks!
Locked