you can have Cairo installed on Win32 as a side-effect of installing GTK+
You probably want at least the zlib, cairo, and libpng run-time archives (you can search on those strings to find them in the page). That should be it
https://www.gtk.org/download/windows.php
The easiest way to install GTK+ and its dependencies in binary form is through the MSYS2 project. MSYS2 provides a UNIX-like development environment for Windows. It provides packages for many software applications and libraries, including the GTK+ stack. These packages are installed using the pacman package manager.
Sorry, but that sounds like many hours of searching and asking questions in specialised forums. No thanks.
Tried to integrate a cairo context in a wx-c main window but found it difficult. In Gtk it seems easier. But as i almost finished the wx-c version it would be waste to stop now. Although wx-c is limited to 32 bit in current version. After that i can still do a gtk version and a pure FB version with "simple gui". Like the idea not to need any other libs to be installed. And that would be the fastest, i suppose.
Roland Chastain wrote:Please read my previous answer. All the files you need are in the package that I provided. Actually it isn't as complicated as it sounds.
OK, I've extracted your archive to FreeBasic\lib\Cairo
Still no luck, ld.exe: cannot find -lcairo
I suppose the files have to be moved to some specific folders?
jj2007 wrote:OK, I've extracted your archive to FreeBasic\lib\Cairo
Still no luck, ld.exe: cannot find -lcairo
I suppose the files have to be moved to some specific folders?
The simplest solution is to let all the files (*.dll, *.dll.a *.bas) in the same folder. Otherwise the right place for libcairo.dll.a is in FBC\lib\win32.
Roland Chastain wrote:The simplest solution is to let all the files (*.dll, *.dll.a *.bas) in the same folder. Otherwise the right place for libcairo.dll.a is in FBC\lib\win32.
Yep, it works now, thanks. So the only really needed file is libcairo.dll.a, and it must sit in FreeBasic\lib\win32 - good to know.
jj2007 wrote:So the only really needed file is libcairo.dll.a, and it must sit in FreeBasic\lib\win32 - good to know.
Not quite! The .dll also has to be in the ExePath (aka: the same place as the .exe),
otherwise, the application will crash ... (needed at run-time!).
(That's the main difference, between Static/Dynamic linked lib's!)
Yes, and for Linux they are libcairo.a to compile and libcairo.so to run. But because they are installed automatically deep in the filesystem with the mentioned apt-get install, the user could give his source code to others and forgets that it depends on files he has not even seen before...
Last edited by lizard on May 06, 2018 10:04, edited 1 time in total.
jj2007 wrote:Is the .dll.a extension exactly the same as *.dll?
No. As far as I know the .dll.a files are stubs that help the linker link against the .dll. They might be the Mingw-equivalent of Visual Studio's .def.