Hello
Now I have problem compiling using MingW.
Problem with other compilers?
Giuseppe
I am not sure wether that error has anything to do with my patch (nerveusly looking at James.... ::'( )?
Giuseppe - sorry that you are having trouble. This error is indeed unrelated to Ves's patch. You need a more recent version of MinGW/GCC to compile this, I think, since I am using now the "thread_local" keyword, which is a new addition to C++ (relatively).
Thank's James
I will try to upgrade MingW.
Giuseppe
I noticed that I had made a typo in the previous version of the signal infowindow. I have fixed that and pushed in this commit: https://github.com/VictorErik/Simutrans-Experimental-Ves/commit/8739bbcf3f21a37185b1e7d7df461ec80c77d271 (https://github.com/VictorErik/Simutrans-Experimental-Ves/commit/8739bbcf3f21a37185b1e7d7df461ec80c77d271)
Also, some initial swedish translations (modifying the original swedish file) to the signal states to see that they works as intended.
Hello James
I update MingW. Now I'm able to build simutrans experimental, but Makefile need an update, James could you insert the line for me?:
CFLAGS += -std=gnu++11
I insert CFLAGS between
LIBS += -lmingw32
and
endif
in the block:
# BeOS (obsolete)
ifeq ($(OSTYPE),beos)
LIBS += -lnet
else
ifneq ($(findstring $(OSTYPE), cygwin mingw),)
ifeq ($(OSTYPE),cygwin)
CFLAGS += -I/usr/include/mingw -mwin32
else
ifeq ($(OSTYPE),mingw)
CFLAGS += -DPNG_STATIC -DZLIB_STATIC
LDFLAGS += -static-libgcc -static-libstdc++ -Wl,--large-address-aware
LIBS += -lmingw32
CFLAGS += -std=gnu++11
endif
endif
SOURCES += simsys_w32_png.cc
CFLAGS += -DNOMINMAX -DWIN32_LEAN_AND_MEAN -DWINVER=0x0501 -D_WIN32_IE=0x0500
LIBS += -lgdi32 -lwinmm -lws2_32 -limm32
# Disable the console on Windows unless WIN32_CONSOLE is set or graphics are disabled
ifneq ($(WIN32_CONSOLE),)
LDFLAGS += -mconsole
Thanks.
I attach the makefile I'm using, the difference is only line CFLAGS += -std=gnu++11
Giuseppe
Thank you for that. I had added these specifications in config.default/config.template instead. Do you think that they need to be in the makefile instead?
Hello James
I think yes, but I need to try. Do you push the update?
Thanks
I have not done that yet; may I ask the reason that you think that it is necessary to have this in the makefile itself rather than config.default?
Hello James
In config.template, the line
FLAGS = -fno-delete-null-pointer-checks -fno-strict-aliasing -std=gnu++11
work (without modifing makefile).
But attention, is -std=gnu++11, not -std=c++11
Giuseppe
I had already modified config.template to contain the line necessary to make it work (and it does work for me); did my modification not work for you? The config.template file thus modified should already be on Github.
Hello James
Quote from: jamespetts on January 07, 2017, 11:16:25 PM
I had already modified config.template to contain the line necessary to make it work (and it does work for me); did my modification not work for you? The config.template file thus modified should already be on Github.
I make new test.
I's ok to modifiy only config.template, but in this mode:
1)
FLAGS = -fno-delete-null-pointer-checks -fno-strict-aliasing -std=c++11
does'nt work for me, but works the line below
FLAGS = -fno-delete-null-pointer-checks -fno-strict-aliasing -std=
gnu++11
Could you test if second line work for you?
2)
I have to comment:
#MULTI_THREAD = 1 # Enable multithreading
Giuseppe
Sorry that you are having difficulty. I have split this from the topic about Ves's patch, as it is unrelated to that.
Thank you for letting me know the issue with the gnu++11 rather than c++11: that was my error in config.template, I think: in my actual Linux compile, it is indeed set to gnu++11. I have decided to put this specification in the actual makefile after all to avoid any possible confusion with editing config.template.
Incidentally, what happens if you do not comment out MULTI_THREAD = 1? Multi-threading can make a significant difference to performance now (and a single-threaded build can no longer stay in sync with a multi-threaded server in Experimental).
Hello James
Actually (github 22/01/2017 version) I have this error and I'm unable to test. May be related to last modify to makeobj besch -> desc?
Giuseppe
My apologies for the error. I think that I have found and fixed the problem; would you be able to re-test?
Hello James
Now similar problem on other file: file export_desc.o
Giuseppe
My apologies for the difficulties. I think that I have fixed it now; would you be able to re-test?
Hello James
Now compile ok.
But using MULTI_THREAD = 1 # Enable multithreading problem I get an error (see the attach image).
Giuseppe
May I ask what version of MinGW that you are using?
Hello James
Fresh install 1 month ago.
Giuseppe
There are two different branches of MINGW, however, one of which is now very out of date and does not handle multi-threading very well; are you using the newer MINGW32?