Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: I met a problem while using pybind11 to generate Python interface of SFML.  (Read 547 times)

0 Members and 1 Guest are viewing this topic.

JasonLeon

  • Newbie
  • *
  • Posts: 14
    • View Profile
    • Email
I can't bind WindowHandle.

error: invalid use of incomplete type 'struct HWND__'

I know it's from Windows API, but #include <Windows.h> didn't work either.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11145
    • View Profile
    • development blog
    • Email
Re: I met a problem while using pybind11 to generate Python interface of SFML.
« Reply #1 on: February 17, 2025, 12:23:11 pm »
Have you seen: https://github.com/martinRenou/pysfml11

What version of SFML are you using?
When does this occur? (I have no idea about pybind11)
Official FAQ: https://www.sfml-dev.org/faq/
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

JasonLeon

  • Newbie
  • *
  • Posts: 14
    • View Profile
    • Email
Re: I met a problem while using pybind11 to generate Python interface of SFML.
« Reply #2 on: February 17, 2025, 12:46:36 pm »
I use SFML 3.0. The repository of the link you gave me is abandoned long ago and there's no WindowHandle.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11145
    • View Profile
    • development blog
    • Email
Re: I met a problem while using pybind11 to generate Python interface of SFML.
« Reply #3 on: February 18, 2025, 08:24:17 am »
Not updated, doesn't necessarily mean abandoned ;D
But it's not using SFML 3, so creating your own might not be the worst idea.

The full HWND definition should be part of the Windows.h header.
But in reality it should be included with SFML's headers.
Official FAQ: https://www.sfml-dev.org/faq/
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything