The Castle Doctrine Forums

Discuss the massively-multiplayer home defense game.

You are not logged in.

#1 2014-01-31 12:15:15

DaVinci
Member
Registered: 2014-01-31
Posts: 69

Compiling the source

When I'm trying to compile the source, I do my ./configure , select windows.

next step, I go to gameSource and do a make.


http://pastebin.com/vVh2HsSb

^ posted the error.




Thanks in advance.

Offline

#2 2014-01-31 12:19:11

jasonrohrer
Administrator
Registered: 2013-04-01
Posts: 1,235

Re: Compiling the source

So... you're using MinGW, I'm hoping?  :-)

Anyway, it looks like you need to install the g++ package for MinGW.  That is the C++ compiler.

Offline

#3 2014-01-31 12:19:35

jasonrohrer
Administrator
Registered: 2013-04-01
Posts: 1,235

Re: Compiling the source

Also... please behave with your custom-compiled Windows binary....

Offline

#4 2014-01-31 12:27:08

DaVinci
Member
Registered: 2014-01-31
Posts: 69

Re: Compiling the source

jasonrohrer wrote:

Also... please behave with your custom-compiled Windows binary....

Shall I fear my tapes in-game all to be watched?

Still, thanks.

PS: I'd like it if you did link the DL.

Last edited by DaVinci (2014-01-31 12:30:03)

Offline

#5 2014-01-31 12:45:32

jasonrohrer
Administrator
Registered: 2013-04-01
Posts: 1,235

Re: Compiling the source

You mean the DL for the g++ MinGW package?

Gosh, I haven't installed MinGW in an awfully long time, so I don't remember.  There are instructions here:

http://www.mingw.org/wiki/InstallationHOWTOforMinGW

I think there's an "automated package installer" thing for MinGW now that lets you check boxes for things like g++ (or maybe it's included with GCC).

Or maybe you mean linking to a DL of the client that you build?  :-)

Offline

#6 2014-01-31 12:49:26

DaVinci
Member
Registered: 2014-01-31
Posts: 69

Re: Compiling the source

jasonrohrer wrote:

You mean the DL for the g++ MinGW package?

Gosh, I haven't installed MinGW in an awfully long time, so I don't remember.  There are instructions here:

http://www.mingw.org/wiki/InstallationHOWTOforMinGW

I think there's an "automated package installer" thing for MinGW now that lets you check boxes for things like g++ (or maybe it's included with GCC).

Or maybe you mean linking to a DL of the client that you build?  :-)


I meant the downloading link for the minGW.

http://pastebin.com/hmRiwfDB

This is the new error now.

Offline

#7 2014-01-31 13:32:02

DaVinci
Member
Registered: 2014-01-31
Posts: 69

Re: Compiling the source

--------------------------------------------------

Please write somewhere what is required to build the client for all the operating systems supported.

I seemed to get SDL,OpenGL and such but a list of them would help a lot of other people.

Offline

#8 2014-01-31 14:48:58

DaVinci
Member
Registered: 2014-01-31
Posts: 69

Re: Compiling the source

bump.

the error I can't deal with is:


http://pastebin.com/yfCSh856


got OpenGL, got SDL, got minGW with gcc++

Last edited by DaVinci (2014-01-31 14:49:27)

Offline

#9 2014-01-31 20:21:30

blankettyblankblank
Member
Registered: 2014-01-31
Posts: 1

Re: Compiling the source

Hi,

I'm getting the same error as above post about windows.h. Fresh (virtual) install of Ubuntu, just installed g++, mingw, sdl, windows.h is in the mingw folder in /usr/. Any ideas?

Last edited by blankettyblankblank (2014-01-31 20:24:01)

Offline

#10 2014-01-31 23:08:04

DaVinci
Member
Registered: 2014-01-31
Posts: 69

Re: Compiling the source

blankettyblankblank wrote:

Hi,

I'm getting the same error as above post about windows.h. Fresh (virtual) install of Ubuntu, just installed g++, mingw, sdl, windows.h is in the mingw folder in /usr/. Any ideas?

Mate, I kinda got what is causing this.

mingW's "<>" includes can't find it although they exist at /usr/include/mingwfolder/.

I manually copy-pasted the windows.h and changed the <> into "" so it would get called from the same folder as the .cpp file.


But I'm sure a more clean way is possible, so I'm googling for it. When I find it, I'll post it.

Offline

#11 2014-02-01 00:36:26

DaVinci
Member
Registered: 2014-01-31
Posts: 69

Re: Compiling the source

Bump.

Offline

#12 2014-02-01 02:10:02

DaVinci
Member
Registered: 2014-01-31
Posts: 69

Re: Compiling the source

the windows.h solution is not completely found atleast by my presence, but:

cp -a FOLDEROFMING /usr/include/

does get the headers I suppose.

Offline

#13 2014-02-01 02:14:30

DaVinci
Member
Registered: 2014-01-31
Posts: 69

Re: Compiling the source

make: *** No rule to make target `../../minorGems/system/win32/windows.h', needed by `../../minorGems/system/win32/TimeWin32.o'.  Stop.


and this would be the new error we'd get. no solutions yet.

Offline

#14 2014-02-01 02:48:20

DaVinci
Member
Registered: 2014-01-31
Posts: 69

Re: Compiling the source

_mingw.h:268:2: error: #error Only Win32 target is supported!

The latest error after a fresh install of the sauce.

Offline

#15 2014-02-01 10:31:48

DaVinci
Member
Registered: 2014-01-31
Posts: 69

Re: Compiling the source

bump

Offline

#16 2014-02-02 02:24:34

DaVinci
Member
Registered: 2014-01-31
Posts: 69

Re: Compiling the source

Bump, Also I'm using Ubuntu, cross-compiling for Windows. To clear minds.

Offline

#17 2014-02-06 08:16:30

DaVinci
Member
Registered: 2014-01-31
Posts: 69

Re: Compiling the source

bump.

Offline

#18 2014-02-06 09:04:40

jasonrohrer
Administrator
Registered: 2013-04-01
Posts: 1,235

Re: Compiling the source

I don't know what you mean about "Using Ubuntu" to build for Windows!  I've never tried that, and I have NO idea if that will work.  I've always booted into Windows and run MinGW from inside Windows.

Anyway, I think you may need the:  w32api  package on MinGW.

You should NOT change it to "windows.h" instead of <windows.h>.... the "<>" brackets tell it to look in the system path, which is where windows.h is kept!

Requirements are:
SDL, OpenGL, g++


The source package is set up so that building on Linux (for Linux) is super easy.  Mac is also pretty easy, if you have SDL installed.  But Windows building is a bit of a headache because getting MinGW installed correctly is a bit of a headache!

And trying to do it from inside Ubuntu is something I've never tried, so you're on your own there!  :-)

Offline

#19 2014-02-06 10:11:11

DaVinci
Member
Registered: 2014-01-31
Posts: 69

Re: Compiling the source

jasonrohrer wrote:

I don't know what you mean about "Using Ubuntu" to build for Windows!  I've never tried that, and I have NO idea if that will work.  I've always booted into Windows and run MinGW from inside Windows.

Anyway, I think you may need the:  w32api  package on MinGW.

You should NOT change it to "windows.h" instead of <windows.h>.... the "<>" brackets tell it to look in the system path, which is where windows.h is kept!

Requirements are:
SDL, OpenGL, g++


The source package is set up so that building on Linux (for Linux) is super easy.  Mac is also pretty easy, if you have SDL installed.  But Windows building is a bit of a headache because getting MinGW installed correctly is a bit of a headache!

And trying to do it from inside Ubuntu is something I've never tried, so you're on your own there!  :-)

Can you write a guide on how to do it on Windows then?

I built my client on linux already.

Last edited by DaVinci (2014-02-06 10:12:24)

Offline

#20 2014-02-06 16:06:19

iceman
Member
Registered: 2013-11-09
Posts: 687
Website

Re: Compiling the source

I've just managed to compile it on Windows, so here's the guide (at least what worked for me).

1. Download MinGW, SDL
a. MinGW link - Download minGW-get-setup.exe
b SDL Link - Download the last one, says (MinGW32) after it
2. Install MinGW
a. Instructions (Do everything until you finish the "After Installing you Should" section)
b. Packages that I used: mingw-developer-tool, mingw32-base, mingw32-gcc-g++, and msys-base
c. Be sure to make a new fstab file - the installation includes fstab.sample, which does NOT work.  Just copy it all into a new file and save it as "fstab" (with quotes - otherwise, it's saved as a useless text file)
3. Install SDL
a. Instructions - Up to "Your first SDL program"
b. You might have to copy the SDL.dll file into Windows/SysWOW64 instead of Windows/Sys32
4. Compile the Game
a. Read "How to connect to the main server" and follow instructions for the key
b. Launch the msys shorcut that you made in 2. (if you didn't, run C:\MinGW\msys\1.0\msys.bat)
c. Navigate to your CastleDoctrine_vXX_UnixSource folder (using cd "C:/Users/etc..." - If the address has spaces, uses "\ " for them)
d. Run runToBuild (just type it and press enter)


The game should be compiled!

That's essentially what I did (with a whole lot of mistakes along the way).  I never encountered a <windows.h> error, so I don't know if those instructions will bypass it or not.

Last edited by iceman (2014-02-06 19:41:51)


Fortress Theory Mod - New objects, tools, and paintings!

I keep dying of a natural cause - Stupidity
The biggest thing that Castle Doctrine has taught me is that the price of your house is proportional to the stupidity of the mistake that kills you.

Offline

#21 2014-02-07 05:17:54

DaVinci
Member
Registered: 2014-01-31
Posts: 69

Re: Compiling the source

I tried to cross-compile it to Windows on Linux, that's why.

Thanks for your contribution to this, I'll add it to wiki

Offline

#22 2014-02-10 14:45:50

jkandi
Member
Registered: 2014-02-10
Posts: 2

Re: Compiling the source

My computer is telling me runToBuild command not found

Offline

#23 2014-02-10 17:35:28

iceman
Member
Registered: 2013-11-09
Posts: 687
Website

Re: Compiling the source

Are you running it from inside the MSYS console?


Fortress Theory Mod - New objects, tools, and paintings!

I keep dying of a natural cause - Stupidity
The biggest thing that Castle Doctrine has taught me is that the price of your house is proportional to the stupidity of the mistake that kills you.

Offline

#24 2014-02-11 12:58:48

jkandi
Member
Registered: 2014-02-10
Posts: 2

Re: Compiling the source

Yes

Offline

Board footer

Powered by FluxBB 1.5.8