Re: Linking a .h file

2019-05-27 Thread infinityplusb via Digitalmars-d-learn

On Saturday, 25 May 2019 at 12:59:50 UTC, Timur Gafarov wrote:

bindbc-nuklear expects nuklear.so in /usr/local/lib.


That's important! I changed my symlink in `/usr/local/lib` from 
`libnuklear.so` to `nuklear.so` and it works now.


Re: Linking a .h file

2019-05-27 Thread infinityplusb via Digitalmars-d-learn

On Saturday, 25 May 2019 at 12:59:50 UTC, Timur Gafarov wrote:
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.


That is what the documentation says, but that doesn't seem to 
work for me.

I'm using an dub.sdl file rather than a dub.json, and using

```
dependency "dagon" version="0.10.0"
subConfigurations {
"dagon" "Minimal"
}
```
but then I get

Error: Nuklear library is not found. Please, install Nuklear.
Program exited with code 1


I'll try with a dub.json but my understanding is both sdl and 
json should produce the same thing?




Re: Linking a .h file

2019-05-25 Thread Timur Gafarov via Digitalmars-d-learn

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.


Linking a .h file

2019-05-23 Thread infinityplusb via Digitalmars-d-learn
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