how to compile in windows
Moderator: Committer
how to compile in windows
Hi I want to compile freeorion in windows and want to know how. I downloaded DevC++ and cygwin. What shall I do ?
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
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
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 with
in SDLInit, replace with
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: Select all
#include <stdlib.h>
Code: Select all
#include <SDL/SDL_getenv.h>
Code: Select all
setenv("SDL_VIDEODRIVER","dummy",0)
Code: Select all
if (getenv("SDL_VIDEODRIVER") == NULL) {
putenv("SDL_VIDEODRIVER=dummy");
}
-
- Space Kraken
- Posts: 146
- Joined: Mon Jul 07, 2003 10:17 am
zlib
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.
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?
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?
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.
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.