#gtk3 app (bluefish) compiles fine, but executable doesn't work

1 messages · Page 1 of 1 (latest)

last mauve
#

Hi all, I'm trying to get the bluefish editor to work on windows. The code compiles fine, I get a bluefish.exe file. But if I start this from the msys2 command prompt it just hangs - no output no errors. If I start the executable from the file explorer, it complains about missing libraries (libcairo-2.dll and a bunch of others).

bluefish was ported to windows some years ago by somebody else using msys2 but that was using gtk2. I have little windows programming experience so I'm a bit struggling how to deal with library problems and such. Does anybody have some good examples how to build a native gtk3 application on windows that I can copy things from?

open nexus
last mauve
#

I found out that all of these libraries are available in c:\msys64\ucrt64\bin so I copied bluefish.exe to that directory and now I don't get any library errors anymore. But I get the same result: no output, no errors, no gtk window popping up..

open nexus
#

how was bluefish built ? did it use msys2 libraries and compiler ? in either case, maybe gdb will help

last mauve
#

yes I compiled it from within the msys2-ucrt64 shell (ran ./configure and make )

last mauve
#

There is something funny with the executable. gdb with a breakpoint on main does never get to the breakpoint....? how can I analyze this?

lilac bobcat
#

Looking at the arch package, it seems to build various libraries as well. Make sure all the DLLs from the build dir are in path.

last mauve
#

those are non-essential plugins, so without these the main executable should run fine.

last mauve
#

could there be any difference if compiling with the mingw-w64 -ucrt-x86_64-* packages in the "msys2 ucrt64" shell, or using the mingw-w64-x86_64-* packages in the "msys2 mingw64" shell ?

shy valve
#

No, the only difference is the runtimes, UCRT uses the newer Universal C Run Time (UCRT) and the other mingw environment uses msvcrt. But you should be able to run regardless of environment as long as you have the microsoft runtimes installed in your OS

#

I'm gonna test myself, see where if anything is wrong

last mauve
#

Thanks. I've tried compiling with both runtimes, no difference. The executable looks good again, but doesn't do anything.

last mauve
#

perhaps related: I do get an error from the linker complaining that the real path for -luuid cannot be found. Can this have any relation with an executable starting without doing anything? I tried installing pacman -S libuuid but it is part of a package that was installed already.

last mauve
#

ok, found the issue. Previously -export-all-symbols was added to the linker, and this option does no longer exist. the linker now interprets this as entry symbol xport-all-symbols and then generates a weird entry point