The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: wernieman on April 02, 2009, 08:34:40 pm

Title: Problem with linux, mingw and Version >=2393
Post by: wernieman on April 02, 2009, 08:34:40 pm
cince 2392 is a problem to generate the simutrans-nightlys for Windows.

since 1 week I search for the problem ..... and see that I can compile the Version 2392 but notz 2393 and newer.

With the version 2393 I get:
Code: [Select]
===> DEP simsys_w32_png.c
cc1: error: invalid option `no-cygwin'

When I resolve the "problem" (The Flag -no-cygwin is not ... O.K.?) I get
Code: [Select]
===> DEP simsys_w32_png.c
simsys_w32_png.c:3:2: #error "Only Windows has GDI+!"
===> CC  simsys_w32_png.c
simsys_w32_png.c:3:2: #error "Only Windows has GDI+!"

Did somebody can help?
Title: Re: Problem with linux, mingw and Version >=2393
Post by: prissi on April 02, 2009, 08:45:54 pm
This is an error directive.

Code: [Select]
#ifndef WIN32
#error "Only Windows has GDI+!"
#endif

As such it should be only included on windows. I thnik the wrong compiler got activated in the makefile.
Title: Re: Problem with linux, mingw and Version >=2393
Post by: wernieman on April 02, 2009, 08:50:36 pm
And the Problem with the Makefile in 2393?

Edit:
Ups .. sorry, I mis understand you ..
you write "wrong compiler got activated in the makefile."

So it is a Problem on my side or in the Makefile?

Edit2:
I put the Makefile from Version 2392 in the aktual Version and it work (but I don't test the compiled Version)

Edit3:
I make a "quick and dirty" Bug-Fixing. In the next nightly I use for the mingw32-Compiler the Makefile of the Version 2392
Title: Re: Problem with linux, mingw and Version >=2393
Post by: prissi on April 02, 2009, 09:05:16 pm
I am not sure, as my Linux is currently in no state to run, as I nixed Grub by windows7 ....
Title: Re: Problem with linux, mingw and Version >=2393
Post by: wernieman on April 02, 2009, 09:08:11 pm
I have no Problem with the normal linux-gcc, only with the cross-compiler for mingw32

(btw: the linux is a cross-compiler too, because the System is a 64Bit-System, but simutrans is for 32 Bit ;o) )

Edit:
Im a little bit tied, why I not look before?

I speak about:
Code: [Select]
ifeq ($(OSTYPE),mingw)
   CC = gcc
   SOURCES += simsys_w32_png.cc
   OS_OPT   ?= -mno-cygwin -DPNG_STATIC -DZLIB_STATIC -march=pentium
   STD_LIBS ?= -lz

in 2393 you set:
CC = gcc

But I use CC for the cross-compiler. In my conig.default for the cross I set:
CC=mingw32-gcc

So ... since 2393 I use the wong compiler!

In german I would say:
"I bin ja soooon Blind, ich könnt mich ... 1 Woche arbeit für ..... 3 mal die mingw Umgebung neu ... dabei hätte ich doch nur EINMAL gucken müssen ...."
But I don't know how to say it in english .....

Do you change the Makefile .. or must I change the Makefile localy?
Title: Re: Problem with linux, mingw and Version >=2393
Post by: prissi on April 02, 2009, 09:44:33 pm
I needed to change it as suddently mingw did not had a compiler for CC available after clean reinstall of the new version.
Title: Re: Problem with linux, mingw and Version >=2393
Post by: wernieman on April 04, 2009, 02:43:50 pm
Next week I make a automaticly edit of the Makefile. Then I will clean every CC (and CXX) Line ...
Title: Re: Problem with linux, mingw and Version >=2393
Post by: wernieman on April 08, 2009, 08:56:01 pm
Can we change the Line to:
Quote
CC ?= gcc

The it is only set when nobody set the CC Compiler ....