digitalmars.D.learn - What I thought was straightforward blew up in my face..
- WhatMeWorry (19/19) Apr 10 import bindbc.sdl;
- Richard (Rikki) Andrew Cattermole (8/8) Apr 10 ```c
import bindbc.sdl; import bindbc.loader; SDL_version ver; SDL_GetVersion(&ver); writeln("version = ", ver); // runs and displays: version = SDL_version(2, 30, 2) writeln("version = ", SDL_GetVersion(&ver)); // compile fails with // template `writeln` is not callable using argument types `!()(string, void)` // C:\D\dmd2\windows\bin64\..\..\src\phobos\std\stdio.d(4249,6): Candidate is: `writeln(T...)(T args)` // Error C:\D\dmd2\windows\bin64\dmd.exe failed with exit code 1. I'll confess I can't make heads or tails out of the error messages. Is this impossible or is there some way to make writeln happy?
Apr 10
```c void SDL_GetVersion(SDL_version * ver); ``` It doesn't return anything. Its return type is void. See the argument list where it lists the types of the arguments: ``template writeln is not callable using argument types !()(string, void)`` Which aligns with the arguments you passed to ``writeln``.
Apr 10