- Home /
DllNotFoundException: libcairo-2.dll
Hi, I had a project working in Unity 3 beta (last tested in beta 7) under Windows 7. I've since changed machine from Win7 32-bit to 64-bit, and also upgraded to Unity 3 RC 2 at the same time. Now my project no longer runs and I'm not sure what's caused it.
The project uses Cairo and Pango -- so I copy Mono.Cairo.dll, pango-sharp.dll and glib-sharp.dll from various places in the Unity exe folder, into my Unity project's Plugins folder. When I call the Cairo.ImageSurface constructor, I get the error DllNotFoundException: libcairo-2.dll.
I've tried copying libcairo-2.dll into my Windows\System32 folder, into the same folder as the Unity exe, into my project's Plugins, Assets and Libraries folders -- all with no effect. How do I get it to work?
Answer by Spotlightor.du · May 15, 2011 at 05:07 PM
I encountered this problem too when I try to load DLL plugin in windows 7 64bit. It's solved by running Unity.exe in "XP Service Pack 3" compatibility mode. You may give it a try: right click "Unity.exe" in your Unity installation folder and enable "compatibility mode".
Answer by Marzoa · Dec 28, 2012 at 12:41 PM
Same problem in OSX Mountain Lion. Obviously no Windows workaround will work here...
Answer by clauz · Feb 20, 2013 at 11:23 AM
I think you have to download full gtk-bundle, which contains cairo and so on (http://www.gtk.org/download/win32.php). For Unity mono use !!! 32-bit only !!!
Unzip it to some location, for example /opt/gtk
Add gtk BIN (!) folder to system path (in my case: /opt/gtk/bin)
Try to restart Unity and run scene again
Your answer
Follow this Question
Related Questions
DllNotFoundException libcairo.so.2 on MacOS 1 Answer
Cannot load native dll in WebGL build 0 Answers
DLL NOT FOUND EXCEPTION even after following procedure 0 Answers
The Assembly is referenced, But the dll is not allowed to be included or could not be found 0 Answers
Failed to load dll error 3 Answers