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.


Messages - marek3571

Pages: [1]
1
General discussions / Cmake can't find SFML?
« on: August 15, 2011, 12:46:16 am »
Actually I just forgot the COMPONENTS part of the find_package command. My bad. Everything appears to be working fine now, but it still wouldn't explain why it said that SFML was found when it couldn't find the include directory.

2
General discussions / Cmake can't find SFML?
« on: August 13, 2011, 05:03:20 am »
Well I found that SFMLDIR wasn't set. I thought it was supposed to have been set when I installed, but I'm pretty new to cmake so i was probably wrong. I set SFMLDIR to the correct directory, but I noticed that the libraries weren't linking, and
Code: [Select]
message ("${SFML_LIBRARIES}") printed an empty line.

3
General discussions / Cmake can't find SFML?
« on: August 11, 2011, 12:56:35 am »
Hi,
I'm trying to get one of the SFML 2.0 builds to work with my own project using cmake. CMake says it found SFML, but the include directory is set to not found. I'm using visual studio 2010.

Here's the code I'm using in cmake:
Code: [Select]

find_package (SFML REQUIRED)
if (SFML_FOUND)
include_directories(${SFML_INCLUDE_DIR})
target_link_libraries(OMG_Engine ${SFML_LIBRARIES})
endif (SFML_FOUND)


Here's the cmake output:
Code: [Select]

Found SFML: SFML_INCLUDE_DIR-NOTFOUND
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
SFML_INCLUDE_DIR
   used as include directory in directory C:/Users/Marek/Documents/sfmlTest


How do I fix this?

4
Window / Strange problem with sf::Window and multiple threads
« on: June 17, 2011, 08:02:39 am »
Well, i just looked a little closer and discovered that the problem is actually the way i handled my threads. The constructor was still running when foo.Create() was called.

5
Window / Strange problem with sf::Window and multiple threads
« on: June 17, 2011, 07:56:03 am »
Hi,
I keep getting a runtime error when trying to create a window with SFML 2.0 when the class itself was constructed on a different thread.

Code: [Select]

class testThread : public MyThread    //not derived from sf::Thread
{
public:
testThread() : foo(), MyThread() {  }    //thread starts upon construction
void run()
{
foo.Create(sf::VideoMode(800, 600), "Test Window");
foo.Close();
}
private:
sf::Window foo;
};


When I try to run this, it crashes in sf::Window::Close() on the line
Code: [Select]
delete myContext; with the error  Unhandled exception at 0x000007fef35cf78f (sfml-window-d-2.dll) in SFML test.exe: 0xC0000005: Access violation reading location 0xffffffffffffffff."

However, I found that if I added
Code: [Select]
sf::Window bar; right before foo.Create(), the whole thing worked. What am I doing wrong???

Pages: [1]