Any particular reason why the binding for <sfRende...
# kotlin-native
b
Any particular reason why the binding for sfRenderWindow does not get generated? I can use (most?) of csfml from kotlin native, I even have the sfWindow, but no sfRenderWindow, and can't find why My libsfml.def :
Copy code
# SFML/Audio.h SFML/Graphics.h SFML/Network.h SFML/System.h SFML/Window.h
headers = SFML/Graphics.h \
          SFML/System.h \
          SFML/Window.h
headerFilter = SFML/**

compilerOpts.linux = -I/usr/include -I/usr/include/x86_64-linux-gnu

# -lcsfml-audio -lcsfml-graphics -lcsfml-network -lcsfml-system -lcsfml-window
linkerOpts.osx = -L/opt/local/lib -lcsfml-graphics -lcsfml-system -lcsfml-window
linkerOpts.linux = -L/usr/lib/x86_64-linux-gnu -lcsfml-graphics -lcsfml-system -lcsfml-window
l
I don't see a path from the headers you set (SFML/Graphics.h, SFML/System.h, SFML/Window.h) to the RenderWindowStruct header. It looks like sfRenderWindow was intended to be an internal structure. I ran into this when I needed AVInternal when using libav. AVInternal wasn't defined in one of the headers you'd generally include, so I couldn't access AVInternal. You may be able to modify the include path to check the src directory.
b
@Landry Norris Thanks for your answer. It is not an internal type,
sfRenderWindow
is an alternative to
sfWindow
, used to draw directly on screen without using opengl, as per the documentation.
sfWindow
is defined in
/usr/include/SFML/Window/Types.h
:
typedef struct sfWindow sfWindow;
sfRenderWindow
is defined in
/usr/include/SFML/Graphics/Types.h
:
typedef struct sfRenderWindow sfRenderWindow;
Not of them declare their internal structure, but cinterops seems to generate the bindings class for
sfWindow
but not for
sfRenderWindow
, I can use the
sfWindow
after adding
import cnames.structs.sfWindow
Wait what, it can't find it anymore now, and why was it under namespace
cnames.structs.
and not
libsfml.
Ok it seems adding
import cnames.structs.sfRenderWindow
manually does work, it compile and run, even if I can't see
sfRenderWindow
definition because when I Ctrl+Clic on it IntelliJ says "Cannot find declaration to go to"