On Saturday, 8 April 2023 at 23:40:32 UTC, Mike Parker wrote:
Not without error messages. The first thing you should do is use the error API in bindbc.loader to print them out. That should tell you what the problem is.

I installed it on my Linux system without using a loader and with static SFML. I just used apt-get and dub. I did the following in order:

1. sudo apt-get install libsfml-dev libcsfml-dev
2. dub init dsfml bindbc-sfml
3. cd dsfml
4. edit dub.json and add:
```java
  "libs": [
                "csfml-audio",
                "csfml-graphics"
        ],
  "subConfigurations": {
                "bindbc-sfml": "staticBC"
        },
  "versions": [
                "SFML_Audio",
                "SFML_Graphics"
        ],
```
5. dub

**app.d**
```d
import bindbc.sfml;

void main()
{
  sfContextSettings* settings;
  sfEvent event;

  auto window = sfRenderWindow_create(
    sfVideoMode(750, 500),
    "Japanese Flag",
    sfWindowStyle.sfDefaultStyle,
    settings
  );

  auto flag = sfCircleShape_create();
       flag.sfCircleShape_setRadius(150);
       flag.sfCircleShape_setPosition(sfVector2f(225, 100));
       flag.sfCircleShape_setFillColor(sfRed);

  while(window.sfRenderWindow_isOpen())
  {
    while(window.sfRenderWindow_pollEvent(&event))
    {
      if(event.type == sfEventType.sfEvtClosed)
      {
        window.sfRenderWindow_close();
      }
    }

    window.sfRenderWindow_clear(sfWhite);
    window.sfRenderWindow_drawCircleShape(flag, null);
    window.sfRenderWindow_display();
  }
}
```

SDB@79
  • How to setup D w... Ki Rill via Digitalmars-d-learn
    • Re: How to ... Mike Parker via Digitalmars-d-learn
      • Re: How... Salih Dincer via Digitalmars-d-learn
      • Re: How... Ki Rill via Digitalmars-d-learn
        • Re:... Mike Parker via Digitalmars-d-learn
          • ... Ki Rill via Digitalmars-d-learn
            • ... Salih Dincer via Digitalmars-d-learn
              • ... Ki Rill via Digitalmars-d-learn
                • ... Salih Dincer via Digitalmars-d-learn
                • ... Ki Rill via Digitalmars-d-learn
                • ... Salih Dincer via Digitalmars-d-learn
    • Re: How to ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn

Reply via email to