Difference between revisions of "HowTo:Cygwin Compiling"
m |
m ([vega-bot] [replace] 4 instances of 'http://vegastrike.sourceforge.net/forums' for 'http://forums.vega-strike.org') |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 2: | Line 2: | ||
| previous=[[HowTo:VCPP Compiling|VCPP Compiling]] | | previous=[[HowTo:VCPP Compiling|VCPP Compiling]] | ||
| up=[[HowTos]] | | up=[[HowTos]] | ||
− | | next=[[HowTo:Compile from | + | | next=[[HowTo:Compile from SVN on Linux]] |
}} | }} | ||
---- | ---- | ||
{{attention}} | {{attention}} | ||
− | =Compiling | + | '''Notice: Cygwin is not known to be working with current versions of Vega Strike. It is strongly reccomended that you seek out alternative methods for compiling.''' |
− | ==Checkout the | + | =Compiling SVN module ''vegastrike'' under Cygwin= |
+ | ==Checkout the SVN-files== | ||
− | Refer to [[HowTo:Checkout | + | Refer to [[HowTo:Checkout SVN]] to obtain the ''vegastrike'' module. |
==Before compiling== | ==Before compiling== | ||
Line 64: | Line 65: | ||
** or [http://oss.sgi.com/projects/ogl-sample/ABI/glext.h glext.h] | ** or [http://oss.sgi.com/projects/ogl-sample/ABI/glext.h glext.h] | ||
− | See also [http:// | + | See also [http://forums.vega-strike.org/viewtopic.php?p=4084#4084 this] or [http://forums.vega-strike.org/viewtopic.php?p=8955#8955 this] thread for more information. |
**copy the glext.h to your toplevel __./src__ directory of your vegastrike dir (or to __/usr/include/GL__ ; or to __/usr/include/w32api/GL__) | **copy the glext.h to your toplevel __./src__ directory of your vegastrike dir (or to __/usr/include/GL__ ; or to __/usr/include/w32api/GL__) | ||
Line 77: | Line 78: | ||
*if you don't want to compile with gtk just turn it off: | *if you don't want to compile with gtk just turn it off: | ||
− | ./configure -- | + | ./configure --disable-gtk ........... |
− | *This | + | *This should not be necessary anymore, but it may solve problems relating to old compilers. (See [http://forums.vega-strike.org/viewtopic.php?t=1147 this] thread in the forum) |
− | ./configure -- | + | ./configure --with-boost=128 ........... |
*You may also need to add path to png lib : | *You may also need to add path to png lib : | ||
Line 90: | Line 91: | ||
cd ./vegastrike | cd ./vegastrike | ||
− | + | ./bootstrap-sh | |
− | + | ./configure --with-gl-lib-name=opengl32 --with-glu-lib-name=glu32 --disable-gtk --with-data-dir=<DIR> | |
− | |||
− | |||
− | ./configure --with-gl-lib-name=opengl32 --with-glu-lib-name=glu32 -- | ||
make | make | ||
make install | make install | ||
Line 100: | Line 98: | ||
=Samples= | =Samples= | ||
*Surfdargent, sample to compile in mingw mode with libcrypto++, portaudio, openal and even gtk support : | *Surfdargent, sample to compile in mingw mode with libcrypto++, portaudio, openal and even gtk support : | ||
− | ./configure CC='gcc -mno-cygwin' CXX='g++ -mno-cygwin' --enable-debug | + | ./configure CC='gcc -mno-cygwin' CXX='g++ -mno-cygwin' --enable-debug --with-include-dir=/usr/local/include |
--enable-crypto --with-png-inc=/usr/include/libpng12 --with-gl-lib-name=opengl32 --with-glu-lib-name=glu32 --enable-netcomm=portaudio | --enable-crypto --with-png-inc=/usr/include/libpng12 --with-gl-lib-name=opengl32 --with-glu-lib-name=glu32 --enable-netcomm=portaudio | ||
--with-openal-libs=/usr/local/lib --with-al-inc=/usr/local/include | --with-openal-libs=/usr/local/lib --with-al-inc=/usr/local/include | ||
− | *Pontiac: See [http:// | + | *Pontiac: See [http://forums.vega-strike.org/viewtopic.php?p=6727#6727 this post] in the Forum. |
* your sample goes here | * your sample goes here | ||
Line 112: | Line 110: | ||
| previous=[[HowTo:VCPP Compiling|VCPP Compiling]] | | previous=[[HowTo:VCPP Compiling|VCPP Compiling]] | ||
| up=[[HowTos]] | | up=[[HowTos]] | ||
− | | next=[[HowTo:Compile from | + | | next=[[HowTo:Compile from SVN on Linux]] |
}} | }} | ||
[[Category:HowTos|Cygwin Compiling]] | [[Category:HowTos|Cygwin Compiling]] |
Latest revision as of 22:29, 8 January 2013
VCPP Compiling | HowTos | HowTo:Compile from SVN on Linux |
Notice: Cygwin is not known to be working with current versions of Vega Strike. It is strongly reccomended that you seek out alternative methods for compiling.
Contents
Compiling SVN module vegastrike under Cygwin
Checkout the SVN-files
Refer to HowTo:Checkout SVN to obtain the vegastrike module.
Before compiling
There are two ways to compile Vega Strike under Cygwin:
- In a "pure" Cygwin mode; and
- In a mingw style (no libcygwin dependency, but msvcrt.dll).
To compile like a mingw compiler, gcc just has to be invoked like this:
gcc -mno-cygwin.
It is easier to get Vega Strike to compile with gcc -mno-cygwin and with all extra libs than in a "pure" cygwin mode since OpenAL and SDL libs require gcc -mno-cygwin for instance.
Soon you will find here two tarballs containing extra-libs that VS can use. The mingw one will be the most complete (includes OpenAL, SDL, SDL_mixer, portaudio, gtk). You will just have to unpack the mingw_files.zip file in /usr/local.
If using gcc -mno-cygwin (mingw build), you may need to copy a few header files from /usr/include to /usr/include/mingw like the jpeg headers (/usr/include/j*.h). You also have to install the zlib-mingw package and you have to undef HAVE_SYS_SELECT_H in /usr/include/python2.{your_python_version}/pyconfig.h too because mingw doesn't provide a select() system function like Posix systems do.
Preparation
(Mainly extracted from CYGWIN.NOTES)
In order to compile Vega Strike under Cygwin there are a few things to check:
- make sure you have these cygwin-packages installed:
- make (Devel)
- gcc v2.x or v3.x (Devel)
- gcc-g++ (Devel)
- automake (Devel)
- autoconf (Devel)
- m4
- binutils
- X11... (XFree86)
- libpng + libpng-devel (Graphics, Libs)
- python (Interpreters)
- python-dev
- expat (Interpreters)
- jpeg (Graphics, Libs)
- libjpegXX (Graphics, Libs)
- zlib or zlib-mingw (Depending on which build type you want)
- w32api
- opengl (the cygwin package not the XFree one !! see below)
- __inetutils__ (Net)
- __glext.h__ needs to be added
- download the file glext.h from one of the locations shown below. Preferable is the one from vega-new-proj I think.
GL/GLUT
- Header files (by hellcatv)
- Other header files
See also this or this thread for more information.
- copy the glext.h to your toplevel __./src__ directory of your vegastrike dir (or to __/usr/include/GL__ ; or to __/usr/include/w32api/GL__)
- when using __libpng 1.2__, --with-png-inc=<DIR> is needed
- OpenGL might be a problem since GL libs provided with the XFree 4.x package should not be used. Instead, we have to use the cygwin OpenGL package which provides some complements to another win32 GL distro (M$, or nVidia ...). So in order to get OpenGL to work, you have to specify at configure time :
./configure --with-gl-lib-name=opengl32 --with-glu-lib-name=glu32 ........
Glut should work ok but if VS complains about not finding glut.dll just copy your /bin/glut32.dll to /bin/glut.dll
- to be sure set the data dir to you vs-data dir:
./configure --with-data-dir=<DIR> ........
- if you don't want to compile with gtk just turn it off:
./configure --disable-gtk ...........
- This should not be necessary anymore, but it may solve problems relating to old compilers. (See this thread in the forum)
./configure --with-boost=128 ...........
- You may also need to add path to png lib :
./configure --with-png-inc=/usr/include/libpng12 ......
Compiling
The compile procedure should look like the following listing depending on what extra libraries you wish to use with VS. Remember the configure part depends on above requirements. Though autoconf may not work, if so just skip it.
cd ./vegastrike ./bootstrap-sh ./configure --with-gl-lib-name=opengl32 --with-glu-lib-name=glu32 --disable-gtk --with-data-dir=<DIR> make make install
Samples
- Surfdargent, sample to compile in mingw mode with libcrypto++, portaudio, openal and even gtk support :
./configure CC='gcc -mno-cygwin' CXX='g++ -mno-cygwin' --enable-debug --with-include-dir=/usr/local/include --enable-crypto --with-png-inc=/usr/include/libpng12 --with-gl-lib-name=opengl32 --with-glu-lib-name=glu32 --enable-netcomm=portaudio --with-openal-libs=/usr/local/lib --with-al-inc=/usr/local/include
- Pontiac: See this post in the Forum.
- your sample goes here
VCPP Compiling | HowTos | HowTo:Compile from SVN on Linux |