Page 1 of 1

Compiling Teeworlds

Posted: Tue Feb 10, 2015 2:38 pm
by TwItCh
When i try to compile teeworlds with bam using (c:\bam\bam release) it says no c/c++ compiler found but ive installed python and did both these steps :

Run in cmd (start>run>cmd): cd bam make_win32_msvc.bat cd ..
Run in cmd (start->run->cmd): ``` %comspec% /k ""C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" x86

I did this from https://www.teeworlds.com/?page=docs&wi ... everything

Re: Compiling Teeworlds

Posted: Tue Feb 10, 2015 2:53 pm
by Alvin Risk
Maybe u need Visual Studio 9 ?

Re: Compiling Teeworlds

Posted: Tue Feb 10, 2015 3:44 pm
by Soreu
1.Download and install Visual C/C++ Express (http://www.microsoft.com/express/download/default.aspx)
2. Download and install Python (http://www.python.org/download/). (for Teeworlds 0.5.2 and earlier the 2.x version, not 3.x)
3. Download and unzip bam (0.2.0 for Teeworlds 0.5.2 and earlier, 0.4.0 for Teeworlds 0.6.0 and later)
https://www.teeworlds.com/?page=docs&wi ... everything

Re: Compiling Teeworlds

Posted: Tue Feb 10, 2015 5:01 pm
by Fifi
TwItCh:
Maybe you forgot to install Visual Studio or its path is now different, because you have a newer version. Check if the directory from

Code: Select all

``` %comspec% /k ""C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" x86
exists and if the Visual Studio wasn't installed in different place.


If it won't help:
Maybe try using the MinGW version. You can install it using https://sourceforge.net/projects/mingw/ ... t/download by choosing MSYS and GCC for instalation and applying changes from the menu. Then you have to add it to your user (not system) PATH, as it's explained on its webpage (http://www.mingw.org/wiki/Getting_Started, section "Environment Settings") and correct the paths in bam's make_win32_mingw.bat - the last line should only compile this: "src/*.c src/lua/*.c".

Re: Compiling Teeworlds

Posted: Tue Feb 10, 2015 9:04 pm
by Soreu
you probably installed Visual studio 10.0, not 9.0 - try it

Code: Select all

%comspec% /k ""C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"" x86

Re: Compiling Teeworlds

Posted: Tue Feb 10, 2015 10:24 pm
by BeaR

Code: Select all

@echo off
if exist "%VCINSTALLDIR%" (
	goto end
)

if defined VS120COMNTOOLS (
	call set VSCOMN=%%VS120COMNTOOLS%%
	goto setup_environment
)

if defined VS110COMNTOOLS (
	call set VSCOMN=%%VS110COMNTOOLS%%
	goto setup_environment
)

if defined VS100COMNTOOLS (
	call set VSCOMN=%%VS100COMNTOOLS%%
	goto setup_environment
)

if defined VS90COMNTOOLS" (
	call set VSPATH=%%VS90COMNTOOLS%%
	goto setup_environment
)

echo Missing visual studio

:setup_environment
if exist "%VSCOMN%..\..\vc\vcvarsall.bat" (
	set arch = %1
	call "%VSCOMN%..\..\vc\vcvarsall.bat" %1
	echo Setup build environment.. Done!
	goto end
)

echo Failure on setting up build environment

:end
Usually using this batch script to setup the visual studio build environenment, works pretty fine with default installations. You can pass the arch as parameter on calling the script.

You can also simply call

Code: Select all

call "%VC120COMNTOOLS%..\vc\vcvarsall.bat" x86
(replace VC120COMNTOOLS with the path variable of your version, 120 == VS2013, 110 == VS2012, 100 = VS2010, 90 == VS2008 ..)