Problems compiling Warzone under WinXP using MinGW:

Do you need help? Ask here!

Bug reporting belongs here: http://developer.wz2100.net/newticket
Post Reply
LostHero
Greenhorn
Posts: 12
Joined: 12 Jul 2009, 02:37
Location: Germany

Problems compiling Warzone under WinXP using MinGW:

Post by LostHero »

Hi all,
I am new to this and have some problems trying to compile warzone on my Windows XP desktop and i hope this is the right place to get some starting aid.
I use the MinGW CompileGUIDE and followed the instructions.

My folders are:

D:\Projekte\devpkg <-- the developementkit
D:\Projekte\GnuWin32 <--- Bison and Flex
D:\Projekte\MinGW <-- MinGW (oh really? :))
D:\Projekte\Warzone2100 <--- svn Warzone2100 checkoutfolder


Everytime i try to compile it with this command:
mingw32-make -f makefile.win32

I get this error:

Image


What went wrong? Any help would be great!


Edit:

When i try to open the project with Visual Studio 2005 i get many errors like "could not read/find user defined file <filename.xy>"
Image
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: Problems compiling Warzone under WinXP using MinGW:

Post by Zarel »

Did you remember this part?

---

In order for mingw32-make to work fine, you will need to add some directories %PATH% environment variable. In Windows 2000 and later you do this by right clicking "My Computer" then select "Properties" -> "Advanced" -> "Environment variables". Now in the subbox called "System variables" you should select "PATH" (or "Path"), click "Edit" (or "Modify" ?) and at the end of that line add ";C:\MinGW\bin;C:\Program Files\GnuWin32\bin" (assuming you installed MinGW into "C:\MinGW" and Flex as well as Bison in "C:\Program Files\GnuWin32"). The final path will then look like this (note the absence of the "double quotes"):

Code: Select all

C:\WINDOWS\system32;C:\Windows;C:\MinGW\bin;C:\Program Files\GnuWin32\bin
LostHero
Greenhorn
Posts: 12
Joined: 12 Jul 2009, 02:37
Location: Germany

Re: Problems compiling Warzone under WinXP using MinGW:

Post by LostHero »

Yes i did...

My Path looks like this:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;d:\Programme\VDMSound;C:\Programme\ATI Technologies\ATI.ACE\;C:\Programme\ATI Technologies\ATI.ACE\Core-Static;C:\Programme\Gemeinsame Dateien\Adobe\AGL;D:\Programme\Zone Labs\ZoneAlarm\MailFrontier;D:\Programme\Cygwin\bin;C:\Programme\QuickTime\QTSystem\;%IDB_PATH%IA32\Script;C:\Programme\Microsoft SQL Server\90\Tools\binn\;C:\Programme\Java\jdk1.5.0_14\bin;D:\uni\informatik\c++\aufgabe20\src\calc;d:\Programme\Universal Extractor;d:\Programme\Universal Extractor\bin;d:\Projekte\MinGW\bin;d:\Projekte\GnuWin32\bin
Image
stiv
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 876
Joined: 18 Jul 2008, 04:41
Location: 45N 86W

Re: Problems compiling Warzone under WinXP using MinGW:

Post by stiv »

Did you install the C++ compiler g++ ?
LostHero
Greenhorn
Posts: 12
Joined: 12 Jul 2009, 02:37
Location: Germany

Re: Problems compiling Warzone under WinXP using MinGW:

Post by LostHero »

I did a full MinGW install.

The bin folder contains the following executables:

Image


PS:
I am using the latest trunk build of wz2100 if that matters...
Image
LostHero
Greenhorn
Posts: 12
Joined: 12 Jul 2009, 02:37
Location: Germany

Re: Problems compiling Warzone under WinXP using MinGW:

Post by LostHero »

This makes absolutely no sense at all.
I verified a dozent times that i have a correct path and a correct mingw install.

The system defenitly KNOWS where the executeables are because when i type

"g++"
"gcc"

etc in the command line it launches the compiler (which ends with the "no input file" message).

So i don't understand, why the mingw32-make command reports those stupid errors posted above :(.


Is someone out there who has a working Visual Studio Project? Because when i try to open the project included in the warzone\win32 folder, VS reports many errors (missing files) and deavtivated nearly 50% of the subprojects in the project map.
Image
stiv
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 876
Joined: 18 Jul 2008, 04:41
Location: 45N 86W

Re: Problems compiling Warzone under WinXP using MinGW:

Post by stiv »

The thing you are missing is cc1plus.exe, part of the compiler pre-processor.

Either it is not installed or is not in the path. You might have better luck with this on a mingw forum. Perhaps the mingw package is faulty.
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: Problems compiling Warzone under WinXP using MinGW:

Post by Zarel »

LostHero wrote:Is someone out there who has a working Visual Studio Project? Because when i try to open the project included in the warzone\win32 folder, VS reports many errors (missing files) and deavtivated nearly 50% of the subprojects in the project map.
Only one of our developers has MSVC working, and that's Visual Studio 2003, and with a ton of hacks. :/ You're better off using MinGW like the rest of us.
LostHero
Greenhorn
Posts: 12
Joined: 12 Jul 2009, 02:37
Location: Germany

Re: Problems compiling Warzone under WinXP using MinGW:

Post by LostHero »

Zarel wrote:Only one of our developers has MSVC working, and that's Visual Studio 2003, and with a ton of hacks. :/ You're better off using MinGW like the rest of us.
that is what i try to do ;).



Edit:

when i rename the g++.exe in cc1plus.exe i get a funny never ending loop of errormessages, so i guess the problem really is that for some reason i am missing the correct cc1plus.exe file just like stiv has said.
now i just have to find out why....


Edit2:

Ok i fixed the problem with the cc1plus.exe...
Maybe someone should add to the compileguide, that the cc1plus.exe file is NOT included in the MinGW\bin folder.
That is why the system can't find it!

The cc1plus.exe is located in x:\...\MinGW\libexec\gcc\mingw32\<your mingw32 version>\
Image
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: Problems compiling Warzone under WinXP using MinGW:

Post by Zarel »

LostHero wrote:Ok i fixed the problem with the cc1plus.exe...
Maybe someone should add to the compileguide, that the cc1plus.exe file is NOT included in the MinGW\bin folder.
That is why the system can't find it!

The cc1plus.exe is located in x:\...\MinGW\libexec\gcc\mingw32\<your mingw32 version>\
It used to be included. Are you sure you're not using a weird distribution of MinGW?
LostHero
Greenhorn
Posts: 12
Joined: 12 Jul 2009, 02:37
Location: Germany

Re: Problems compiling Warzone under WinXP using MinGW:

Post by LostHero »

yes i double checked that (clean install).

and it IS included, but it is NOT in the \bin folder.
I found this hint via google (looks like i am not the only one with that problem).
But now that this problem is solved, i have a new one hehe (oh how suprising... windows and compiling stuff oh yeah!).

Normaly i work with IDEs like Eclipse Europe, Code:Blocks or Visual Studio and everyting i did until now where "own projects" which i wrote from scratch up in those IDEs (thats why i never had problems compiling stuff).

Now this is my first huge code project i try to get into (for learning reasons) and i have serious problems getting a version compiled using the command line.

The Makefile now seem to work as stated above (it finds all executeables) but know it looks like the compiler can't find the system include files like "windows.h", "iostream" and all those stuff.

Those files are located in my windows sdk folder and work fine in my own projects (where i set up the include path in my project settings).
But the compiler can't find them when i use the commandline (and the warzone2100 makefiles).

Where/how can i set up include paths for the commandline? I tried adding the paths into the system variables "classpath" and "path" but that doesn't seem to fix it.
Or do i have to modify the makefiles (i guess not)?
Image
stiv
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 876
Joined: 18 Jul 2008, 04:41
Location: 45N 86W

Re: Problems compiling Warzone under WinXP using MinGW:

Post by stiv »

Code: Select all

Where/how can i set up include paths for the commandline? I tried adding the paths into the system variables "classpath" and "path" but that doesn't seem to fix it.
Or do i have to modify the makefiles (i guess not)?
CLASSPATH is for Java class files. Not applicable here.
PATH is for running executables. Like gcc and our old friend ccplus1.exe

Have you read the file COMPILE in the Warzone source dir? It has instructions for mingw.
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Problems compiling Warzone under WinXP using MinGW:

Post by cybersphinx »

LostHero wrote:Ok i fixed the problem with the cc1plus.exe...
Maybe someone should add to the compileguide, that the cc1plus.exe file is NOT included in the MinGW\bin folder.
That is why the system can't find it!

The cc1plus.exe is located in x:\...\MinGW\libexec\gcc\mingw32\<your mingw32 version>\
In theory cc1plus shouldn't be in the path, since you can have several gcc exes installed (like gcc-4.4, gcc-4.3...). Every gcc then calls .../mingw32/<itsownversion/cc1plus. The question is how you tell the gccs where its private exes are. Putting that directory in the path might work as long as you never install any other gcc versions into that mingw installation.
LostHero
Greenhorn
Posts: 12
Joined: 12 Jul 2009, 02:37
Location: Germany

Re: Problems compiling Warzone under WinXP using MinGW:

Post by LostHero »

stiv wrote:

Code: Select all

Where/how can i set up include paths for the commandline? I tried adding the paths into the system variables "classpath" and "path" but that doesn't seem to fix it.
Or do i have to modify the makefiles (i guess not)?
CLASSPATH is for Java class files. Not applicable here.
PATH is for running executables. Like gcc and our old friend ccplus1.exe

Have you read the file COMPILE in the Warzone source dir? It has instructions for mingw.
The COMPILE file includes nearly the same text as the "online compileguide" does ;).
cybersphinx wrote:In theory cc1plus shouldn't be in the path, since you can have several gcc exes installed (like gcc-4.4, gcc-4.3...). Every gcc then calls .../mingw32/<itsownversion/cc1plus. The question is how you tell the gccs where its private exes are. Putting that directory in the path might work as long as you never install any other gcc versions into that mingw installation.


Thanks for all your responses, i was finally able to solve all those problems and.... let me tell you.... now i HATE compiling under windows even more :).


Remember my Path settings i posted at the beginning?

there was this little part in it:

Code: Select all

D:\Programme\Cygwin\bin;
the reason why this part has caused all the trouble is that cygwin has its own g++ compiler... I don't know which version and i also don't know why that compiler could not find the "windows.h" "iostream", etc include files (cygwin has them as well), but after i removed the cygwin\bin folder from my PATH, everything works just fine.
now i don't even need to add

Code: Select all

x:\...\MinGW\libexec\gcc\mingw32\<your mingw32 version>\
in order to find the cc1plus.exe file...
Why do things always tend to be more complicated than necessary...

So thanks again for all your patience and help, everything works fine now and i can finally start to look into the code!
Image
User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

Re: Problems compiling Warzone under WinXP using MinGW:

Post by Buginator »

LostHero wrote:Is someone out there who has a working Visual Studio Project? Because when i try to open the project included in the warzone\win32 folder, VS reports many errors (missing files) and deavtivated nearly 50% of the subprojects in the project map.
Zarel wrote:Only one of our developers has MSVC working, and that's Visual Studio 2003, and with a ton of hacks. :/ You're better off using MinGW like the rest of us.
Actually, I am using 2005, and the only real problem(s) is(are), the libs are old & crash prone*, can't make static builds, and ... um... need old versions of bison/flex.

*that is, since they are old, then can crash on you when you try to do like --help or something along those lines, so it doesn't do us any good to release things made with this compiler.
and it ends here.
Post Reply