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

Author Topic: PTITLEBARINFO is not declared error during compilation using G++ 6.3.0 on MinGW  (Read 3389 times)

0 Members and 1 Guest are viewing this topic.

Dawid90dd

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Hello. I've encountered a very annoying error after try of compilation using MinGW with G++ version 6.3.0



I'm building using cmake command:
cmake -G"Unix Makefiles"

And after that:
make -j2

Can you help me? I'm trying to write my own library for game development which uses newest SFML 2.4.2, and i'm encountering this error.

I've also found this topic:
https://stackoverflow.com/questions/46396148/compiling-sfml-with-mingw-has-ptitlebarinfo-not-declared

But it doesn't help me much...

Edit Postscriptum:
I'm also compiling the same library but on linux (ubuntu) but it doesn't throw me any errors. (as i understand this is windows related problem and more peculiarly winapi?)

Also, i know that it says SFML 2.3.2 but i've tried SFML 2.4.1 and SFML 2.4.2, it throws me the same error.

I've found that this issue is related to Window module because it throws errors from window module files

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
I'm building using cmake command:
cmake -G"Unix Makefiles"
Unless you're also running it within MSYS or Cygwin (which btw is not supported by SFML), the correct generator is MinGW Makefiles.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Dawid90dd

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
I've changed PATH so it doesn't use MSYS make and uses mingw32-make and MinGW. I've encountered the same error.

I've used

cmake -G"MinGW Makefiles"

mingw32-make -j2

Compiler is still 6.3.0

I do want to compile it on 6.3.0 because all of my libraries are compiled on MinGW with gcc 6.3.0. If that is a problem then i might try to downgrade it to 6.1.0 and use already compiled version of SFML 2.4.2 by you.

My friend tried to compile it on 6.3.0 and is having the same problem.
« Last Edit: November 23, 2017, 09:14:46 pm by Dawid90dd »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Did you clear the CMake cache and do a clean build?

What exact version of MinGW are you using, i.e. what file did you download to install it?
What OS are you running?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Dawid90dd

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
I've unpacked fresh source code archive. I've cleared PATH so it doesn't use MSYS Make. I've used MinGW Automated installer (MinGW Installation Manager) which downloaded for me GCC of 6.3.0. I'm using Windows 7 64 bit on VirtualBox. (my friend has windows 7 64 bit but not on virtualbox and has the same problem) mingw32-g++ is 6.3.0
« Last Edit: November 23, 2017, 09:19:33 pm by Dawid90dd »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Sounds like a broken implementation shipped by that MinGW version.
You could follow the linked StackOverflow answer and try to fiddle with the winuser.h

Personally, I would recommend to use the superior MinGW-w64 project and use MinGW Builds. Besides getting GCC versions up to 7.2.0 you also get a in my experience more stable MinGW experience and support for x64, plus with the POSIX threading model, you also get std::thread support.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Dawid90dd

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
I've installed using mingw64 automated installer mingw with gcc 6.1.0. It works now perfectly.

Thank you.

 

anything