Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to compile on Linux? #100

Closed
carstenhag opened this issue Oct 8, 2014 · 8 comments
Closed

How to compile on Linux? #100

carstenhag opened this issue Oct 8, 2014 · 8 comments

Comments

@carstenhag
Copy link

Haven't found any instructions yet, how is this done on say a ubuntu x64 installation?

@Elyotna
Copy link
Owner

Elyotna commented Oct 8, 2014

mkdir build
cd build
cmake ../
make -jX # where X is your number of cores

Binary is located in build/gamed/ and named "intwars".

You'll have to copy the "filearchives" folder from the client next to your binary in build/gamed/ so that it can load the RAF files.

@carstenhag
Copy link
Author

Thanks. Getting some error:
http://i.imgur.com/VH44DNY.png

What I did:

sudo apt-get install cmake g++-mingw-w64
git clone https://github.com/Elyotna/IntWars.git
cd IntWars
cmake ./
make

And then I got this warning and it failed compiling.

@carstenhag carstenhag changed the title Compiling instructions on Linux distros Compiling warnings/errors on Linux/Ubuntu Oct 8, 2014
@Elyotna
Copy link
Owner

Elyotna commented Oct 8, 2014

So.. you're trying to cross-compile to windows64 from linux64 ? Why do you want to do that ?

@carstenhag
Copy link
Author

Sorry, I basically have no idea how to compile/build this stuff. I just want to compile the server to be ran on a ubuntu installation.

@Elyotna
Copy link
Owner

Elyotna commented Oct 8, 2014

mingw is an adaption of linux build tools (g++ etc.) to build binaries for windows. The package g++-mingw-w64 will give you a cross-compiler to build windows binaries from a linux context.

Just remove it (apt-get remove g++-mingw-w64) and install the regular g++ (apt-get install g++)

@carstenhag
Copy link
Author

Sorry to be annoying.

Started again on a fresh ubuntu. Installed g++ and cmake.

Got this again: http://i.imgur.com/EfgiOEo.png

Tried it on a fresh fedora 20 x64 system (installed gcc, gcc-g++, cmake) and it didnt work either (got the same exact error).

@Yaakushi
Copy link

Yaakushi commented Oct 8, 2014

It seems like you're running out of memory. Try to increase your swap size (or the memory itself).

@carstenhag
Copy link
Author

@Yaakushi Used a 1GB RAM vps now, it worked. gcc alone used like 350 MB and I only had ~150 free on the other one. Seems like I have no swap yet, I have to look into setting that up.

@Querijn Querijn changed the title Compiling warnings/errors on Linux/Ubuntu How to compile on Linux? Oct 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants