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 - Daddi

Pages: [1]
Hi guys,
I'm using SFMLs network library to send simple data packets to a single client. That part works flawlessly.

When my program starts it initializes and in the end waits for a client using TCPListener.accept() with a blocking socket. When I want to close the program (console application) via CTLR+C "something" happens (e.g. OpenCV closes the connection to the webcam etc.) but the process itself doesn't quit. I have to terminate it via task manager.

If I comment the listening part out the program stops at the end of the main function as planned, so it should be a problem with the blocking socket.

What I tried is setting the socket unblocking and polling every 50ms in a while loop using sf::sleep(). But that also prevents the process to quit completely. I'd be okay using a keypress inside the while to break the loop and let the program run to the end of main, but I don't know how, as there is no window to get any events / key presses and I didn't find a way to do non-blocking console I/O via C++.

Additional information:

Windows 8.1
SFML 2.2
Visual Studio 2013
Other used libraries: OpenCV, ArUco (AR marker tracking)

I start the process via the windows console command window.

General / Shared SFML Libs + Static Runtime Libs?
« on: January 03, 2014, 03:57:39 pm »
Hi guys,
I ran into the following problem.

I compiled SFML myself using MinGW Builds 4.8.1 and build shared libs. If I try to use them in my project and simultaneously try to use -static or -static-libgcc -static-libstdc++ my executable gets bigger by including libgcc and libstd++ (and pthreads on -static) but is still asking for the libgcc dll.

I think its because the SFML .dlls are linked dynamically to libstdc++ and libgcc. That didn't happen while I used TDM, probably because TDM linked libgcc/stdc++ statically although SFML_USE_STATIC_STD_LIBS was unchecked (as it has to be for shared sfml libs).

What did I do wrong? What can I change?


Pages: [1]