On Tuesday, 12 March 2019 at 15:48:14 UTC, Ron Tarrant wrote:
I managed to get dexed to compile a single-file dub project, but for completeness sake, I'm also trying to configure it to use dmd (non-dub) to compile GtkD projects using Compilation (menu) > Compile File and Run.

To that end, I have two questions...

Should I be supplying dexed with the include (read: import) path: /usr/include/dmd/gtkd3/

Or the runtime: /usr/lib/x86_64-linux-gnu/libgtkd-3.so

And where in dexed does one set the path so it can find a library such as gtkd?

There's two different things here.

1. "Compile File and Run"

It's for the scripts-like program, i.e single module. For this, the dependencies must be registered in the "library manager". An entry defines the import path (the dmd -I option), and the static library file (*.a, *.lib depending on the platform), and a few others fields.

When you execute the action "Compile File and Run", the source is analyzed and the rights imports are automatically passed to DMD, if the matching lib is registered in the libman.

2. Dexed projects.

The "native" project format was created before I understood that DUB was the official way to make a D project so it's somewhat not recommended to use it, although it works (for example at some points I had translated non trivial projects, such as dlangUI, to this format, and I still have a few stuff working using them).

In this case as you've been said you have the dmdOtherOpts, which can be used to pass whatever you want and will be passed to DMD as is, after (however) the IDE variables expansion.

see https://basile-z.github.io/dexed/widgets_dexed_project_editor#other-options for more details.

But the dexed project format can also use the library manager. In this case, just like for the "runnable modules" the libraries must be registered in the library manager. Then you specify the alias of the dependencies in the project, see https://basile-z.github.io/dexed/widgets_dexed_project_editor#general-options (libraryAliases).

example:

https://github.com/Basile-z/kheops/blob/master/kheops.dprj#L58

___

Finally: the most important thing is to register the library in the libman.
https://basile-z.github.io/dexed/widgets_library_manager#library-manager

Reply via email to