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

Author Topic: issues using renderTexture from a dll class  (Read 1125 times)

0 Members and 1 Guest are viewing this topic.

o1011488

  • Guest
issues using renderTexture from a dll class
« on: December 19, 2015, 07:48:24 pm »
Note: These classes are within a dll
I am trying to implement a method within my map class a method which
receives a pointer for a renderTexture then adds the background for the map and the objects

//returns the composite image of the background with all of the objects added on to it
void Map::getImage(RenderTexture *image)
{
        //sets the width and height of the renderTexture, to the width and height of the background sprite
        if (!image->create(background.getTextureRect().width, background.getTextureRect().height))
        {

        }
        image->clear();
        //adds the background to the renderTexture
        image->draw(background);
        for (int x = 0;x < objects.size();x++)
        {
                //adds the sprite of the object to the rendertexture
                image->draw(objects.at(x)->getImage());
        }
       
        image->display();
}
 
Error   :LNK2001   unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B)

The pointer will come from the main loop and it will then be added to the renderwindow

What could be the cause of the error?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: issues using renderTexture from a dll class
« Reply #1 on: December 19, 2015, 11:40:44 pm »
Sounds like you defined SFML_STATIC even though you're linking dynamically.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

o1011488

  • Guest
Re: issues using renderTexture from a dll class
« Reply #2 on: December 20, 2015, 05:33:13 am »
thank you very much, I'm sorry for the newbie mistake :-[

 

anything