Your hello-world program fails to build in XCode

I would suggest doing a Google search for ‘macports < your error message >’ as these questions have probably been asked many times before. Do you have X11 available? For example, try sudo port install xorg-server.

If you get an error about D-Bus, see this comment.

It seems macports is still shipping GTK3 with X11 enabled, which is wrong and broken. GTK has native macOS support.

The port has a quartz variant but I don’t think that is the default.

GTK is trying to use X, which I do not want .Any ideas how to force it to use quartz? I’m hoping to have a platform independent program when It’s finished. Is that even possible with gtk?

As you’re using MacPorts, this is a MacPorts question. First see this section on port upgrade. The manual suggests you can do

sudo port upgrade --enforce-variants gtk3 +quartz

I haven’t checked that works.

Of course, the Gtk API and the stack of libraries it is built on are portable except - obviously - parts that provide platform-specific features, e.g. the GdkX11 API, but you don’t need to use any platform-specific APIs unless you have a specific requirement relating to a particular platform.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.