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

Author Topic: SFML THOR Error cannot access private member  (Read 1841 times)

0 Members and 1 Guest are viewing this topic.

zeustacos

  • Newbie
  • *
  • Posts: 4
    • View Profile
SFML THOR Error cannot access private member
« on: March 27, 2014, 11:58:57 pm »
Hi, I've been doing sfml for a while, just encountered this issue and I am aware that this means that somewhere I might be attempting to copy something, maybe the window
however, I don't see anywhere that I would do this.
I have a class in a .h file and this is the implementation. http://pastebin.com/kq5uCJfG
I can't even try to debug because for some reason (new to VS, so maybe some weird setting) it just skips over my debug stop points, although it never happened before.

So if anyone can please see my error (the way I use this implementation, is I have a render window in a class that uses an object of type Particles, which I send in Particles as a reference. I've done this with every other object I use in my project and it works fine.

Thank you for taking the time to read this.

*Edit : Forgot to put full error = http://pastebin.com/5E3yFXjv

**Edit: The error is referring to the particlesystem, however, I don t seem to be using it any different then how it is being used in the examples.
« Last Edit: March 28, 2014, 10:35:19 am by zeustacos »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10800
    • View Profile
    • development blog
    • Email
Re: SFML Error cannot access private member
« Reply #1 on: March 28, 2014, 12:09:14 am »
The error seems to be within Thor's header. Are you certain the code you posted is the relevant code?
Also what SFML and Thor version/revision are you using?

(window).draw(m_system);

The brackets around window are not needed and confusing.

I can't even try to debug because for some reason (new to VS, so maybe some weird setting) it just skips over my debug stop points, although it never happened before.
This usually happens when you're in release mode. There's a debug mode for a reason. :P
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

zeustacos

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: SFML Error cannot access private member
« Reply #2 on: March 28, 2014, 12:16:07 am »
thanks for the quick reply, sorry about the window brackets, I was just trying whatever comes to mind to see what could be a problem...in one of my desperate tries I put them there, I am in debug mode, and yet it skips and it just runs a previously working build, the only other code that I have handles input :

void Particles::pollEvent(sf::Event& ev)
{
        switch(ev.type)
        {
                case sf::Event::MouseButtonPressed:
                        if (ev.mouseButton.button == sf::Mouse::Left)
                        m_paused = !m_paused;
                        break;
                case sf::Event::MouseWheelMoved:
                        m_velocity.phi += 12.f * ev.mouseWheel.delta;
                        break;
        }

}

then I take all these methods, and I have them in the Game class like this:
while((m_window).pollEvent(ev))
                {
                        if(ev.type == sf::Event::Closed)
                                return;
m_ballParts.pollEvent(ev);
                }
                (m_window).clear();
                m_ballParts.loop(m_window,frameTime);
 

I am using the latest nighty build you actually shared, thanks for that by the way, http://sfml.my-gate.net/nightly , the VS2010 64bit 2013-09-26  Thor Dev [35391b0421] version

*Edit : SFML 2.1
« Last Edit: March 28, 2014, 10:23:19 am by zeustacos »

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: SFML THOR Error cannot access private member
« Reply #3 on: March 28, 2014, 04:25:18 pm »
Are you trying to copy the thor::ParticleSystem object? The copy may be subtle, such as the return value of a function or the copy of an object that contains the particle system as a member. But as stated by the error message, particle systems are not copyable.

Furthermore, you're using a combination of SFML and Thor that is not guaranteed to be compatible, see also the information on my homepage. If it works, fine, but in general I recommend using the latest SFML and the latest Thor version, both from GitHub.
« Last Edit: March 28, 2014, 04:28:21 pm by Nexus »
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

zeustacos

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: SFML THOR Error cannot access private member
« Reply #4 on: April 19, 2014, 01:54:50 am »
Thanks for the comment Nexus, I downloaded both sfml and thor from github, built sfml with cmake and tested it, it works. But then, when I tried to build no lib file actually appeared, it just said Generating done.


I then tried via the command line and it told me that the version of my sfml was 1 instead of 2..when I cloned exactly the latest sfml and I even have the number 2 in their names.



Is there anything you can help with this? I really don't see what I am doing wrong, of course there is something, I just need help. Thank you very much.



Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: SFML THOR Error cannot access private member
« Reply #5 on: April 19, 2014, 10:46:57 am »
But then, when I tried to build no lib file actually appeared, it just said Generating done.
What does that mean? You're aware that CMake is not supposed to output .lib files, but rather makefiles or projects that you can build yourself?

Quote
when I cloned exactly the latest sfml and I even have the number 2 in their names.
Where did you clone it from? Just erase everything SFML-related from your computer, and clone Git from the master branch here. In particular, delete also the CMake configuration files so that really nothing is left over.

And make sure you have write access to the paths specified in CMake.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

zeustacos

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: SFML THOR Error cannot access private member
« Reply #6 on: April 19, 2014, 11:41:00 am »
Hey sorry, part of that problem was me forgetting to say I used nmake afterwards however
I keep getting the same problem with sfml not being the latest. I did clone
the master of both sfml and thor, I'll erase everything and do it again.

*Edit : I wiped everything, reinstalled and now all of the build process worked perfectly. I'll update my code and try again but I think it will work now.
I don't really understand what the issue was other then the fact that maybe I misswrote the command.
 Thank you very much.
« Last Edit: April 19, 2014, 12:50:23 pm by zeustacos »

 

anything