MINGW-packages: meld Cannot import: GTK+

got this error while runing mingw64/mingw-w64-x86_64-meld3 3.19.0-2:

Couldn't bind the translation domain. Some translations won't work.
[WinError 126] The specified module could not be found
Cannot import: GTK+
DLL load failed: The specified procedure could not be found.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (5 by maintainers)

Most upvoted comments

Probably a Meld issue. Here’s their issue and a possible workaround

https://gitlab.gnome.org/GNOME/meld/issues/267

What works for me: copy Meld/lib/libgirepository-1.0-1.dll to one folder up (next to Meld.exe).

https://gitlab.gnome.org/GNOME/meld/issues/267#note_448659

---------------------------
cx_Freeze: Python error in main script
---------------------------
Traceback (most recent call last):
  File "bin/meld", line 205, in check_requirements
    import gi
  File "C:/msys64/MINGW32/lib/python3.7/site-packages/gi/__init__.py", line 42, in <module>
  File "ExtensionLoader_gi__gi.py", line 23, in <module>
  File "ExtensionLoader_gi__gi.py", line 15, in __bootstrap__
  File "C:/msys64/MINGW32/lib/python3.7/imp.py", line 342, in load_dynamic
ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:/msys64/MINGW32/lib/python3.7/site-packages\cx_Freeze/initscripts/__startup__.py", line 14, in run
  File "C:/msys64/MINGW32/lib/python3.7/site-packages\cx_Freeze/initscripts/Console.py", line 26, in run
  File "bin/meld", line 362, in <module>
    check_requirements()
  File "bin/meld", line 211, in check_requirements
    missing_reqs("GTK+", gtk_requirement, e)
  File "bin/meld", line 194, in missing_reqs
    show_error_and_exit(_("Cannot import: ") + mod + "\n" + str(exc))
  File "bin/meld", line 182, in show_error_and_exit
    raise Exception(error_text)
Exception: Cannot import: GTK+
DLL load failed: The specified module could not be found.

---------------------------
OK   
---------------------------

I’ve added only C:\Program Files (x86)\Meld\lib to my Path user variable, and now Meld works fine.

Thanks for the resolution. Just to reiterate: adding both C:\tools\Meld and C:\tools\Meld\lib to the path does solve the problem.

This is for those that arrived here with a meld installation (no MINGW) from the link shared above by @shihrer ; triggering meld from the command line works just fine after also adding this dir to your path, guess will be the same for other tools that use it…

meld works fine with “Git Bash” shell under windows (from any directory), when you add both “C:\Program Files (x86)\Meld” and “C:\Program Files (x86)\Meld\lib” to your PATH environmental variable.

For what it’s worth.

I manually added ‘C:\Program Files(x86)\Meld’ to the path, and every time I started Meld from git Meld would crash.

After I also added “C:\Program Files(x86)\Meld\lib” it started working as expected.

Same error with Meld-3.20.0-mingw

Same issue here, 3.20.0. Copying Meld/lib/libgirepository-1.0-1.dll to Meld indeed works as a workaround. Meld.exe was not in the same directory as libgirepository-1.0-1.dll.