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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - deltaphc

Pages: [1]
1
I have a ResourceManager class that basically maintains a cache of SFML objects. At compile-time, it's giving me this error:
Code: [Select]
1>  ResourceManager.cpp
1>d:\prog\libs\sfml-2.0-rc\include\sfml\system\mutex.hpp(89): error C2248: 'sf::NonCopyable::NonCopyable' : cannot access private member declared in class 'sf::NonCopyable'
1>          d:\prog\libs\sfml-2.0-rc\include\sfml\system\noncopyable.hpp(67) : see declaration of 'sf::NonCopyable::NonCopyable'
1>          d:\prog\libs\sfml-2.0-rc\include\sfml\system\noncopyable.hpp(42) : see declaration of 'sf::NonCopyable'
1>          This diagnostic occurred in the compiler generated function 'sf::Mutex::Mutex(const sf::Mutex &)'
The thing I don't understand with this error is that I don't even use a Mutex anywhere in my code. I don't even use threading. And as far as I'm aware, all of the objects I use in ResourceManager (Texture, Music, Sound, Font) are all copyable and thus shouldn't generate this error as a side effect... that is, if I'm actually copying anything. I've tried to use object references where possible.

Some relevant source code;

ResourceManager.cpp:
http://pastebin.com/7YPtcEpH

ResourceManager.h:
http://pastebin.com/dNgBUejg

Common.h:
http://pastebin.com/YUcCQFwy

Level.h does not use any SFML types other than sf::Color.

Sorry about the amount of code. I wish I could isolate this further, but the compiler certainly isn't helping. I'm guessing that I'm missing something simple; I'm certainly no expert in all of C++'s little details.

I'm using the precompiled VS2010 package for SFML 2.0 RC. 32-bit compiler on Win7 x64.

2
C / Two issues I've come across
« on: January 27, 2009, 10:32:33 am »
Hello! Couldn't find these issues elsewhere, so I decided to register and post this.

At the top of my main.c:
Code: [Select]
#include <string.h>
#include <SFML/Audio.h>
#include <SFML/Graphics.h>
#include <physfs.h>


When I try to compile:
Code: [Select]
C:\dev\SFML-1.4\CSFML\include\SFML\Graphics\RenderWindow.h|51|error: redefinition of typedef 'sfRenderWindow'|
C:\dev\SFML-1.4\CSFML\include\SFML\Graphics\Image.h|36|error: previous declaration of 'sfRenderWindow' was here|
||=== Build finished: 2 errors, 0 warnings ===|


Using MinGW (GCC 4.3.2) and CodeBlocks. Any ideas?

Also, in the CSFML/lib/mingw/ folder in the C SDK, it appears that the filenames of the dynamic and static libraries are reversed. i.e. it's named libcsfml-audio.a when it should be audio-s, etc.

The regular C++ version works fine, but I just code in C as a personal preference. ;)

Pages: [1]
anything