How to create a native executable / library with Gnome Builder?

I wanted to be able to generate an actual executable with Gnome Builder, but I can’t find the option to do this.

I tried changing the Runtime option to “host system” (or something like it, my interface is not in English), but even so when I ask to export the software it generates a flatpak.

Is it possible to output a native executable? Does it have to do with the project type?

Also, how can I generate a system lib (.a / .so)?

Thank you.

I tried asking this question on GNOME’s Gitlab issue tracker, but they told me the correct place to ask it was here.

So… If no one here can give me any directions, I’m lost…

To add to the situation, I found that I can set the “default” compilation options to use the native runtime, but this same option on my project-specific configuration is disabled. please see the images below (they are in pt_BR).

I usually build with “Host Operating System” as runtime and that works fine for an application and private library.

I use GNOME Builder 42.1 (Debian package). My setup seems to be exactly like yours (shown in pt_BR):

I use this “Default” setup, maybe you didn’t press “Tornar ativo”? The headerbar looks different, I usually press the “Run” (“Executar” CTRL+F5) button. Not sure what you mean with “export the software”. There is a grayed out button called “Export Bundle” (pt_BR: “Exportar pacote”). Do you expect it to create a tarball?

1 Like

Thank you, @gkarsay, it worked! I just hit the “Tornar ativo” and it used the native runtime.

What I mean is that, before, the Builder bundled the app as a flatpak, so I thought it could bundle the native executable and export it too. By bundle I mean compile, link, etc.

But I guess I can consider this question as resolved.

Thank you again.

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