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

Author Topic: SFML 144 Errors in Rect.inl  (Read 1084 times)

0 Members and 1 Guest are viewing this topic.

Dolotboy

  • Newbie
  • *
  • Posts: 8
    • View Profile
SFML 144 Errors in Rect.inl
« on: November 02, 2022, 04:18:59 am »
I installed SFML via Nugget Package Manager. I had it in another project and everything is working fine. Now I created a Dynamic Library project in C++ and reinstalled it. But I automatically got these errors

https://imgur.com/a/BrGVckU

I already read this but it didn't solve my problem:
https://en.sfml-dev.org/forums/index.php?topic=20008.0
https://en.sfml-dev.org/forums/index.php?topic=25059.0
https://en.sfml-dev.org/forums/index.php?topic=26401.0
https://en.sfml-dev.org/forums/index.php?topic=27880.0


Here are the only places where I use SFML. I really don't understand

#pragma once
#include <SFML/Graphics.hpp>

class World2D
{
   public:

      World2D(); // Empty World2D
      World2D(std::string windowName, double windowWidth, double windowsHeight); // World with size

   protected:

   private:
};




#pragma once
#include <SFML/Graphics.hpp>
#include <string>

class Sprite2D
{
   public:

      Sprite2D(); // Empty Sprite
      Sprite2D(std::string spritePath, double spriteWidth, double spriteHeight); // Sprite
      Sprite2D(std::string spritePath, double spriteWidth, double spriteHeight, double posX, double posY); // Sprite and a determined position
      ~Sprite2D();

   protected:

   private:

};

Dolotboy

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: SFML 144 Errors in Rect.inl
« Reply #1 on: November 02, 2022, 04:28:43 am »
I figured that in my framwork.h that comes with the DLL project there is indeed an include to windows.h. But I cannot remote it, because when I remove it, yes the 144 errors disapears, but some other appears and make my dllmain.cpp stop working. What can I do

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: SFML 144 Errors in Rect.inl
« Reply #2 on: November 02, 2022, 08:20:22 am »
Don't include the windows header in a header file and include it after the SFML headers.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/