Linking a .h file
Timur Gafarov
gecko0307 at gmail.com
Sat May 25 12:59:50 UTC 2019
23.05.2019 13:12, infinityplusb пишет:
> I'm trying to use Dagon (https://github.com/gecko0307/dagon) for what I
> thought would be a simple enough project.
> Initially the one thing I needed to do was to install Nuklear and
> Freetype 2.8.1 `Under other OSes you have to install them manually` as
> I'm running on Ubuntu.
>
> I'm using dub and thought this would be a simple matter of adding some
> parameters to the .sdl file, however I'm finding it tricky figuring out
> what to add (or if I'm oversimplifying or overcomplicating things).
>
> So I've found either a .h file here (https://github.com/vurtun/nuklear)
> or here has something I can compile to a .so file
> (https://github.com/Timu5/bindbc-nuklear).
> However no matter where I put files or whatever dub.sdl parameters I
> use, I can't seem to get it to work.
> My current sdl looks like:
>
> name "test"
> description "Test"
> targetType "executable"
> dependency "dagon" version="0.10.0"
> libs "nuklear" platform="posix"
> lflags "-L/usr/local/lib/"
>
>
> My latest error is
> ```
> error while loading shared libraries: libnuklear.so.4.0.2: cannot open
> shared object file: No such file or directory
>
> ```
>
> If it's a simple dub config thing, can someone handhold me through what
> the best way to get this to work is? Otherwise which file (.h or .so)
> should I put where for it to get picked up?
>
> TIA
bindbc-nuklear expects nuklear.so in /usr/local/lib. Or you can compile
Dagon without optional libraries, using "Minimal" subconfiguration in
your dub.json:
"subConfigurations": {
"dagon": "Minimal"
}
Fonts and GUI will be unavailable then. You can also use "NoNuklear" and
"NoFreetype" subconfigurations.
More information about the Digitalmars-d-learn
mailing list