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

Author Topic: SFNUL  (Read 51407 times)

0 Members and 1 Guest are viewing this topic.

Turbine

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Re: SFNUL
« Reply #45 on: April 29, 2014, 07:17:55 am »
This doesn't compile for me, I get a heap of errors (MinGW 4.8.2)
What is the full version of your MinGW g++? You can find out by issuing the command g++ -v in the MinGW console. Post it here.

Here it is, I'll try in another release of MinGW.

Quote
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=C:/mingw2/bin/../libexec/gcc/x86_64-w64-mingw32/4.8.2/lto-wr
apper.exe
Target: x86_64-w64-mingw32
Configured with: ../../../src/gcc-4.8.2/configure --host=x86_64-w64-mingw32 --bu
ild=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysr
oot=/c/mingw482/x86_64-482-win32-seh-rt_v3-rev3/mingw64 --with-gxx-include-dir=/
mingw64/x86_64-w64-mingw32/include/c++ --enable-shared --enable-static --disable
-multilib --enable-languages=ada,c,c++,fortran,objc,obj-c++,lto --enable-libstdc
xx-time=yes --enable-threads=win32 --enable-libgomp --enable-libatomic --enable-
lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --
enable-version-specific-runtime-libs --disable-isl-version-check --disable-cloog
-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootst
rap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --di
sable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 -
-with-libiconv --with-system-zlib --with-gmp=/c/mingw482/prerequisites/x86_64-w6
4-mingw32-static --with-mpfr=/c/mingw482/prerequisites/x86_64-w64-mingw32-static
 --with-mpc=/c/mingw482/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mi
ngw482/prerequisites/x86_64-w64-mingw32-static --with-cloog=/c/mingw482/prerequi
sites/x86_64-w64-mingw32-static --enable-cloog-backend=isl --with-pkgversion='x8
6_64-win32-seh-rev3, Built by MinGW-W64 project' --with-bugurl=http://sourceforg
e.net/projects/mingw-w64 CFLAGS='-O2 -pipe -I/c/mingw482/x86_64-482-win32-seh-rt
_v3-rev3/mingw64/opt/include -I/c/mingw482/prerequisites/x86_64-zlib-static/incl
ude -I/c/mingw482/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2
 -pipe -I/c/mingw482/x86_64-482-win32-seh-rt_v3-rev3/mingw64/opt/include -I/c/mi
ngw482/prerequisites/x86_64-zlib-static/include -I/c/mingw482/prerequisites/x86_
64-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/c/mingw482/x86_64-482
-win32-seh-rt_v3-rev3/mingw64/opt/lib -L/c/mingw482/prerequisites/x86_64-zlib-st
atic/lib -L/c/mingw482/prerequisites/x86_64-w64-mingw32-static/lib '
Thread model: win32
gcc version 4.8.2 (x86_64-win32-seh-rev3, Built by MinGW-W64 project)

MinGW 4.8.1 x86 is also acting the same.
« Last Edit: April 29, 2014, 07:24:13 am by Turbine »

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: SFNUL
« Reply #46 on: April 29, 2014, 10:34:51 am »
Can you compile this?
#include <mutex>

int main()
{
    std::mutex m;
}
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

Turbine

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Re: SFNUL
« Reply #47 on: April 29, 2014, 11:43:26 am »
Can you compile this?
#include <mutex>

int main()
{
    std::mutex m;
}

It isn't working like this either. I wonder why std::mutex it's not being included with MinGW.
« Last Edit: April 29, 2014, 01:42:16 pm by Turbine »

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: SFNUL
« Reply #48 on: April 29, 2014, 02:23:26 pm »
Well... your installation is screwed up. You are probably using the old headers that had experimental/broken threading support. Maybe if you delete the whole folder and replace it with a fresh install it will work.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

Turbine

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Re: SFNUL
« Reply #49 on: April 30, 2014, 12:58:46 am »
Well... your installation is screwed up. You are probably using the old headers that had experimental/broken threading support. Maybe if you delete the whole folder and replace it with a fresh install it will work.

[Edit]
It seems that threading in MinGW is currently experimental and in development. MinGW-builds worked whereas the normal build from mingw.org did not include the library.
« Last Edit: April 30, 2014, 01:18:24 am by Turbine »

MorleyDev

  • Full Member
  • ***
  • Posts: 219
  • "It is not enough for code to work."
    • View Profile
    • http://www.morleydev.co.uk/
Re: SFNUL
« Reply #50 on: April 30, 2014, 01:43:54 am »
It depends on the threading model used by the MinGW version I believe. If it's compiled to use the Win32 threading model, it does not support std::thread, whilst the Posix threading model uses winpthread to provide threading support.
UnitTest11 - A unit testing library in C++ written to take advantage of C++11.

All code is guilty until proven innocent, unworthy until tested, and pointless without singular and well-defined purpose.

zeno15

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • Email
Re: SFNUL
« Reply #51 on: December 09, 2014, 03:45:19 am »
Apologies for resurrecting this thread but it was the only relevant one I could find. 

I'm attempting to build SFNUL with Visual Studio 2013, and have run into issues, if anyone had any ideas that'd be greatly appreciated.

Firstly when you say to add preproccessor definitions, is that after cmake has made the visual studio solutions, or before?  And if it is after, where do I actually add them, I've looked and the place where I would normally define SFML_STATIC etc isn't present, unless I'm missing something.

Thanks for your time guys.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10801
    • View Profile
    • development blog
    • Email
AW: SFNUL
« Reply #52 on: December 09, 2014, 07:29:24 am »
When building SFNUL, CMake will set everything properly, as long as you check/uncheck the right settings.
Only once you try to link everything into your final application, you'll need to set pre-processor flags when linking statically.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: SFNUL
« Reply #53 on: December 12, 2014, 12:52:12 am »
So... what exactly would this tutorial contain? You do essentially the same as you would do if you built SFML, so you can just refer to the SFML tutorial on building with CMake. If you are already familiar with that but still insist that SFNUL should have it's own pictorial step-by-step tutorial just so you don't have to think a bit, then maybe you should stick to SFML's networking. You simply can't appreciate what SFNUL has to offer if you aren't willing to explore a bit yourself.

And by the way... people do use SFNUL already. Certain kinds of people... The people who I consider worth writing a library for.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Re: SFNUL
« Reply #54 on: February 08, 2015, 06:02:07 pm »
hmm this might be useful when I get around to the networking part of my game.


Meantime out of curiosity.  Are you planning on implementing UDP assuming you haven't already.  I know there aren't many changes between TCP and UDP but just wondering on that note. :)
I have many ideas but need the help of others to find way to make use of them.

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: SFNUL
« Reply #55 on: February 08, 2015, 06:09:50 pm »
Are you planning on implementing UDP assuming you haven't already. I know there aren't many changes between TCP and UDP but just wondering on that note.
What do you mean with "implementing UDP"? UDP sockets are already implemented and usable.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Re: SFNUL
« Reply #56 on: February 08, 2015, 06:11:33 pm »
Are you planning on implementing UDP assuming you haven't already. I know there aren't many changes between TCP and UDP but just wondering on that note.
What do you mean with "implementing UDP"? UDP sockets are already implemented and usable.

oops, guess it would help if I wouldn't glaze over things when looking for them. :(
I have many ideas but need the help of others to find way to make use of them.

Zax37

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: SFNUL
« Reply #57 on: April 12, 2015, 10:01:09 am »
Hey there,
I'm really fighting hard to build SFNUL and see all that awesomeness, but it's just not letting me.
First of all - git submodule isn't working for me, so I cloned the dependencies by myself.
Secondly - had some problems with mingw headers, but found patch which fixed it.
Now I'm already at 89% and it's throwing errors at my face again:

E:\Projects\SFNUL\src\SFNUL\NetworkResource.cpp:35:10: error: invalid use of tem
plate-name 'asio::strand' without an argument list
  mutable asio::strand strand;
          ^
E:\Projects\SFNUL\src\SFNUL\NetworkResource.cpp: In constructor 'sfn::NetworkRes
ource::NetworkResourceImpl::NetworkResourceImpl()':
E:\Projects\SFNUL\src\SFNUL\NetworkResource.cpp:26:3: error: class 'sfn::Network
Resource::NetworkResourceImpl' does not have any field named 'strand'
   strand{ *io_service }
   ^
E:\Projects\SFNUL\src\SFNUL\NetworkResource.cpp: In member function 'void* sfn::
NetworkResource::GetStrand() const':
E:\Projects\SFNUL\src\SFNUL\NetworkResource.cpp:51:18: error: 'class sfn::Networ
kResource::NetworkResourceImpl' has no member named 'strand'
  return &m_impl->strand;
                  ^
E:\Projects\SFNUL\src\SFNUL\NetworkResource.cpp:52:1: warning: control reaches e
nd of non-void function [-Wreturn-type]
 }
 ^
CMakeFiles\sfnul.dir\build.make:4614: recipe for target 'CMakeFiles/sfnul.dir/sr
c/SFNUL/NetworkResource.cpp.obj' failed
mingw32-make[2]: *** [CMakeFiles/sfnul.dir/src/SFNUL/NetworkResource.cpp.obj] Er
ror 1
CMakeFiles\Makefile2:59: recipe for target 'CMakeFiles/sfnul.dir/all' failed
mingw32-make[1]: *** [CMakeFiles/sfnul.dir/all] Error 2
Makefile:115: recipe for target 'all' failed
mingw32-make: *** [all] Error 2

I'm using TDM GCC 4.9.2 DW2 and I successfully built SFML, SFGUI and all other goodness under it, so what's wrong with SFNUL? Also, doesn't that whole "asio" need to be built? It's not included in CMakeLists. Thanks!

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: SFNUL
« Reply #58 on: April 12, 2015, 10:48:16 am »
First of all - git submodule isn't working for me, so I cloned the dependencies by myself.
Instead of working around a problem, you should really try fixing it. ;)

The submodule declarations contain more than just a repository name/source, they also contain branches/versions. Indeed, SFNUL doesn't use the master version of ASIO, so whatever you cloned probably doesn't work out of the box like the submodule does.

Secondly - had some problems with mingw headers, but found patch which fixed it.
This sounds even more troubling... What kind of a patch was this? And what did/didn't work? If anything doesn't work, at least ask for assistance before applying random patches to the base installation. They might end up breaking more things than they fix.

I'm using TDM GCC 4.9.2 DW2 and I successfully built SFML, SFGUI and all other goodness under it, so what's wrong with SFNUL?
There is nothing wrong with SFNUL, but there are many things wrong with your development environment as stated above. ;)

Also, doesn't that whole "asio" need to be built? It's not included in CMakeLists.
No. Using the submodule that I picked out, ASIO can be used header-only. I have no idea what repository/branch you are on right now, but I can't guarantee that something you cloned yourself will work with SFNUL.

Rewind (reinstall MinGW if necessary), and go back to the "git submodule doesn't work for me" stage and provide some error information. That is a starting point that we will be able to work with.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

Zax37

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: SFNUL
« Reply #59 on: April 12, 2015, 11:08:16 am »
Instead of working around a problem, you should really try fixing it. ;)
Yeah, I'd love to, just couldn't find any solution, so I just sadly accepted the fact that windows version of github has its charms ;p error is:

fatal: 'submodule' appears to be a git command, but we were not
able to execute it. Maybe git-submodule is broken?

I've found some questions about it, no solution though.

This sounds even more troubling... What kind of a patch was this? And what did/didn't work? If anything doesn't work, at least ask for assistance before applying random patches to the base installation. They might end up breaking more things than they fix.
http://tehsausage.com/mingw-to-string
Well, it seems to have worked for me :P

There is nothing wrong with SFNUL, but there are many things wrong with your development environment as stated above. ;)
Hahah yeah I know, I was just messing with You :P SFML handled it though!

Rewind (reinstall MinGW if necessary), and go back to the "git submodule doesn't work for me" stage and provide some error information. That is a starting point that we will be able to work with.
Yeah, I'll start with reinstalling MinGW and/or building with another version.
Thanks for the support ;)