FreeOrion

Forums for the FreeOrion project
It is currently Mon May 20, 2013 7:15 pm

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 30 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: how to compile in windows
PostPosted: Mon Jun 30, 2003 12:57 pm 
Offline
Space Squid

Joined: Fri Jun 27, 2003 6:23 pm
Posts: 66
Location: Milkyway
Hi I want to compile freeorion in windows and want to know how. I downloaded DevC++ and cygwin. What shall I do ?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 30, 2003 1:07 pm 
Offline
Programming Lead Emeritus
User avatar

Joined: Thu Jun 26, 2003 1:33 pm
Posts: 1092
Read the README.txt in WindowsKit.zip.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 30, 2003 1:59 pm 
Offline
Space Kraken

Joined: Thu Jun 26, 2003 2:17 pm
Posts: 167
Location: Pittsburgh, PA
cygwin isn't necessary either, though use it if you're more comfortable with *nix


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 08, 2003 12:24 pm 
Offline
Space Squid

Joined: Fri Jun 27, 2003 9:00 am
Posts: 78
Location: Germany
I need some help compiling in windows too...

First, some problems i already solved:

1. CVS Server says EOF or error code 1 or something similiar and doesnt do anything: Means its full.. you have to login till you get an code 0 as answer, then try to co the files till you get them.
2. If your files arent in c:\ you have to change the include-paths in dev-cpp

My problem is:
While compiling the server.dev he stops in ServerApp.cpp andin line 459 and says 'setenv' undeclared (first use this function)

I did a fulltextsearch on everything i have, but this function is declared nowhere, so its not a missing include or something. Could someone tell me, in which file this function should be declared and where i can get this file.

Thx


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 08, 2003 4:01 pm 
Offline
Space Squid
User avatar

Joined: Thu Jun 26, 2003 1:13 pm
Posts: 82
Location: Ottawa
Which version of Windows are you running? 98?

I don't think 98 supports environment variables... I know that NT, 2000, and XP do.

Anyway... setenv should be in stdlib.h.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 08, 2003 8:41 pm 
Offline
Programmer
User avatar

Joined: Sat Jun 28, 2003 8:17 pm
Posts: 376
Location: Heidelberg, Germany
Whoops!

Win98 does not apper to have setenv, it has putenv instead.

I modified ServerApp.cpp to use SDL's getenv and putenv, should work now.

BTW: The patch seems to be so huge because somebody forgot to turn Unix-linebreaks an, and my Editor automatically removes them

EDIT: Till the new revision is available on the backup CVS-server, here are the lines that have changed:

line 14:replace
Code:
#include <stdlib.h>
with
Code:
#include <SDL/SDL_getenv.h>

in SDLInit, replace
Code:
setenv("SDL_VIDEODRIVER","dummy",0)
with
Code:
if (getenv("SDL_VIDEODRIVER") == NULL) {
  putenv("SDL_VIDEODRIVER=dummy");
}


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 08, 2003 11:35 pm 
Offline
Space Squid

Joined: Fri Jun 27, 2003 9:00 am
Posts: 78
Location: Germany
Im using win-xp.

Strange, why didnt anyone else had problems compiling then? Is everybody using linux here? Should i be ashamed?

Have i found a bug? May i be proud?

And thx for the help, i will try tomorrow in the morning


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 09, 2003 1:54 am 
Offline
FreeOrion Lead Emeritus
User avatar

Joined: Thu Jun 26, 2003 6:23 am
Posts: 883
Location: Australia
This may not show up on the public server straight away elfstone, so don't be surprised if you update your copy and you don't get the change. The only solution is to wait until it's there - a maximum of 24 hours from when it was committed.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 14, 2003 9:53 am 
Offline
Space Squid

Joined: Fri Jun 27, 2003 9:00 am
Posts: 78
Location: Germany
Now i get an error in message.cpp in the where zlib.h is included. I searched my harddisk again, and found no zlib.h, neither in dev-cpp nor in freeorion. Where do i get the right version of this file, and is it part of a package i will miss later?

Thx..


Top
 Profile  
 
 Post subject: zlib
PostPosted: Mon Jul 14, 2003 10:05 am 
Offline
Space Kraken

Joined: Mon Jul 07, 2003 10:17 am
Posts: 146
The actual library is in the windows kit. I had to download the .h file seprately here http://www.gzip.org/zlib/ and stick it into my includes directory.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 14, 2003 11:16 am 
Offline
Space Squid

Joined: Fri Jun 27, 2003 9:00 am
Posts: 78
Location: Germany
okay, i downloaded zlib, made an directory c:\dev-cpp\include\zlib\ put all the files in there, and included it in my project-file. The server now compiled without errors, when i start him, i get some debuginfos, then he waits. How can i exit the server?


Now, when i try and compile the humanclient, i get those errors, and 300 others afterwards...

Compiler: Default compiler
Building Makefile: "C:\freeorion\client\human\Makefile.win"
Executing make...
make.exe -f "C:\freeorion\client\human\Makefile.win" all
g++.exe -D__DEBUG__ -c chmain.cpp -o ../../objs/chmain.o -I"C:/Dev-Cpp/include/c++" -I"C:/Dev-Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/include/SDL" -I"C:/Dev-Cpp/include/c++/mingw32" -I"C:/freeorion/boost_1_30_0" -I"C:/Dev-Cpp/include/freetype2" -I"C:/freeorion/Expat-1.95.5/Source/lib" -I"../../GG/include" -I"../../GG/include/net" -I"../../GG/include/dialogs" -I"c:/dev-cpp/include" -DFREEORION_WIN32 -DFREEORION_BUILD_HUMAN -g3

In file included from C:/Dev-Cpp/include/freetype2/freetype/freetype.h:41,
from ../../GG/include/GGText.h:35,
from ../../GG/include/GGApp.h:35,
from C:/Dev-Cpp/include/SDLGGApp.h:43,
from HumanClientApp.h:6,
from chmain.cpp:1:
C:/Dev-Cpp/include/ft2build.h:1:3: invalid preprocessing directive #Doxyfile
C:/Dev-Cpp/include/ft2build.h:3:2: invalid preprocessing directive #--
C:/Dev-Cpp/include/ft2build.h:4:3: invalid preprocessing directive #General
C:/Dev-Cpp/include/ft2build.h:5:2: invalid preprocessing directive #--
In file included from C:/Dev-Cpp/include/freetype2/freetype/freetype.h:41,
from ../../GG/include/GGText.h:35,
from ../../GG/include/GGApp.h:35,
from C:/Dev-Cpp/include/SDLGGApp.h:43,
from HumanClientApp.h:6,
from chmain.cpp:1:
C:/Dev-Cpp/include/ft2build.h:6: ISO C++ forbids de claration of `PROJECT_NAME'




The file ft2build.h is in my c:\dev-cpp\include directory, but it looks like a doxy-configuration file, not like a header file. What am i doing wrong this time?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 19, 2003 6:13 pm 
Offline
Space Squid

Joined: Fri Jun 27, 2003 6:23 pm
Posts: 66
Location: Milkyway
I have also problems with compiling in Windows.
First I had to fill in include directories at Projekt Options.
Second I had errors:
at server:

\Dev-Cpp\Bin\..\lib\gcc-lib\mingw32\3.2\..\..\..\..\mingw32\bin\ld.exe C:\freeorion\server\C
cannot find -lboost_signals

C:\freeorion\server\Makefile.win
[Build Error] [../freeoriond.exe] Error 1


at humanclient:
../../objs/ServerConnectWnd.o C:\Dev-Cpp\mingw32\bin\ld.exe
[Warning] duplicate section `.data$_ZTV16ServerConnectWnd' has different size

\Dev-Cpp\Bin\..\lib\gcc-lib\mingw32\3.2\..\..\..\..\mingw32\bin\ld.exe C:\freeorion\client\human\C
cannot find -lSDL_mixer

C:\freeorion\client\human\Makefile.win
[Build Error] [../../freeorion.exe] Error 1

----------------------
I have to say that most people want to play that game in Windows so I guess it should be compilable.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 19, 2003 6:25 pm 
Offline
Programmer
User avatar

Joined: Sat Jun 28, 2003 8:17 pm
Posts: 376
Location: Heidelberg, Germany
Did you correctly copy the files from WindowsKit.zip into the DevCpp directory and the WindowsKit DLLs into the root-directory of FreeOrion?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 20, 2003 9:26 am 
Offline
Space Squid

Joined: Fri Jun 27, 2003 9:00 am
Posts: 78
Location: Germany
Yes.
And i had to change some of the includedirectories, since i didnt install it in c:\boost\ but c:\freeorion\boost etc.
He's not complaining that he cant find a file, but there is a file included, that does not contain c++ but a skript for the doxyfile imho.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 20, 2003 8:20 pm 
Offline
Space Squid

Joined: Fri Jun 27, 2003 6:23 pm
Posts: 66
Location: Milkyway
I could compile everything now.

The problem is, that when I begin a game no server is found, I tried every server. :?

I guess that the execute I should choose is the humanclient. I guess the humanclient works together with the both other execute-files. Or what shall I do with these other both ? :? :shock:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 30 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group