Cross Compiling Linux to Windows ( Debian )

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
User avatar
ConVicT
Shutout Match Winner
Posts: 1001
Joined: Fri Feb 17, 2012 2:33 am

Re: Cross Compiling Linux to Windows ( Debian )

Post by ConVicT »

You followed the same things I did and it worked for me.
Only thing I can think is you're missing something.
Herer's what I used.
I tried to upload here but 5mb max uploads, and I would'a linked you to sourceforge but I had this handy.
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Cross Compiling Linux to Windows ( Debian )

Post by Z-Man »

The most canonical docs for Windows builds are here:
Windows_Development

Note the recent update to the required code::blocks version (13.12 since a couple of days) and especially steps 1 and 2 in this section:
Windows_Development#Building_Armagetron_Advanced
The missing batch files are why you are getting warnings and errors during compilation. The way I get around these steps on the cross-compilation builds is that I start the windows build from a source .zip which has the result of these steps (or rather, their unix equivalents) baked in. Yeah, it's all a bit obscure. The source zip is build with the "zipsource" target in the 0.4-build-work branch, so... better run the batches if you can.
User avatar
LittleSteps
Core Dumper
Posts: 157
Joined: Thu Apr 12, 2012 2:30 am

Re: Cross Compiling Linux to Windows ( Debian )

Post by LittleSteps »

Z-Man wrote:The most canonical docs for Windows builds are here:
Windows_Development

Note the recent update to the required code::blocks version (13.12 since a couple of days) and especially steps 1 and 2 in this section:
Windows_Development#Building_Armagetron_Advanced
The missing batch files are why you are getting warnings and errors during compilation. The way I get around these steps on the cross-compilation builds is that I start the windows build from a source .zip which has the result of these steps (or rather, their unix equivalents) baked in. Yeah, it's all a bit obscure. The source zip is build with the "zipsource" target in the 0.4-build-work branch, so... better run the batches if you can.
I decided to go full on windows and compile with a new source and several other things I have updated / changed.

Thanks for the link, I believe the problems with the .rc files are completely fixed due to the troubleshooting section on the wiki.

Although the only errors I seem to be receiving now are these

Code: Select all

c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\libstdc++.a(stdexcept.o):stdexcept.cc|| multiple definition of `std::out_of_range::~out_of_range()'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\libstdc++.a(stdexcept.o):stdexcept.cc|| multiple definition of `std::out_of_range::~out_of_range()'|
||=== Build failed: 2 error(s), 89 warning(s) (7 minute(s), 15 second(s)) ===|

Is this a problem with code blocks? I am using the "codeblocks-13.12mingw-setup.exe" version.
User avatar
ConVicT
Shutout Match Winner
Posts: 1001
Joined: Fri Feb 17, 2012 2:33 am

Re: Cross Compiling Linux to Windows ( Debian )

Post by ConVicT »

-----------------------------------------------------------------
Attachments
giphy.gif
User avatar
LittleSteps
Core Dumper
Posts: 157
Joined: Thu Apr 12, 2012 2:30 am

Re: Cross Compiling Linux to Windows ( Debian )

Post by LittleSteps »

ConVicT wrote:-----------------------------------------------------------------
lol at least I got it down to two errors, just cant figure out where these are coming from i don't see out_of_range defined in any of the tron files.
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Cross Compiling Linux to Windows ( Debian )

Post by Z-Man »

Have you tried a full rebuild? :) (Seriously, that sometimes helps. You seem to have done that already, though.)

Usually, linker errors of that type indicate that you're trying to link a C++ library with a wrong version of the compiler. But 4.7.1 is the right version, it's what I use too, and what I used for the boost libraries... could it be that you have an old build of FTGL in your winlibs folder?
User avatar
LittleSteps
Core Dumper
Posts: 157
Joined: Thu Apr 12, 2012 2:30 am

Re: Cross Compiling Linux to Windows ( Debian )

Post by LittleSteps »

Z-Man wrote:Have you tried a full rebuild? :) (Seriously, that sometimes helps. You seem to have done that already, though.)

Usually, linker errors of that type indicate that you're trying to link a C++ library with a wrong version of the compiler. But 4.7.1 is the right version, it's what I use too, and what I used for the boost libraries... could it be that you have an old build of FTGL in your winlibs folder?

A full rebuild night be annoying but it wouldn't hurt so I will try that again.


The winlibs folder I am using is from this branch
https://code.launchpad.net/~armagetrona ... nlibs-work

I believe I following the tutorial you gave me perfectly, I have tried to compile with my build and the fresh source of 0.4 and neither work so I don't think its the source being the issue.


Could it be an issue within codeblocks?
User avatar
LittleSteps
Core Dumper
Posts: 157
Joined: Thu Apr 12, 2012 2:30 am

Re: Cross Compiling Linux to Windows ( Debian )

Post by LittleSteps »

I tried with an older version of code blocks and still did not get it to compile properly.

Is this what my project thing should have minus all the server stuff?


Image



Keep getting this same error no mater what i change

Code: Select all


c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1\libstdc++.a(stdexcept.o):stdexcept.cc:(.text+0x174): multiple definition of `std::out_of_range::~out_of_range()'
..\..\..\winlibs\win32\boost_libs\libboost_thread-mgw44-mt-1_53.a(thread.o):thread.cpp:(.text$_ZNSt12out_of_rangeD1Ev[__ZNSt12out_of_rangeD1Ev]+0x0): first defined here
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1\libstdc++.a(stdexcept.o):stdexcept.cc:(.text+0x180): multiple definition of `std::out_of_range::~out_of_range()'
Last edited by LittleSteps on Thu Aug 20, 2015 2:34 am, edited 2 times in total.
User avatar
ConVicT
Shutout Match Winner
Posts: 1001
Joined: Fri Feb 17, 2012 2:33 am

Re: Cross Compiling Linux to Windows ( Debian )

Post by ConVicT »

It is what I have.
But I remove master and dedicated.
Attachments
Capture.PNG
Capture.PNG (8.42 KiB) Viewed 3185 times
User avatar
LittleSteps
Core Dumper
Posts: 157
Joined: Thu Apr 12, 2012 2:30 am

Re: Cross Compiling Linux to Windows ( Debian )

Post by LittleSteps »

ConVicT wrote:It is what I have.
But I remove master and dedicated.
Man how can I follow every tutorial, try every option, and try different sources and still not be able to compile.

I dont know whats with the compiler error.
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Cross Compiling Linux to Windows ( Debian )

Post by Z-Man »

Huh? On 0.4 now, all the external library projects should be gone. Only libprotobuf and FTGL are left, the rest are in winlibs in binary form already and no longer compiled with the standard code::blocks workspace. What exactly have you opened there?
(If you want to compile 0.2.8, you need the matching 0.2.8-winlibs and that really old 1.0 release candidate code::blocks.)
User avatar
LittleSteps
Core Dumper
Posts: 157
Joined: Thu Apr 12, 2012 2:30 am

Re: Cross Compiling Linux to Windows ( Debian )

Post by LittleSteps »

Z-Man wrote:Huh? On 0.4 now, all the external library projects should be gone. Only libprotobuf and FTGL are left, the rest are in winlibs in binary form already and no longer compiled with the standard code::blocks workspace. What exactly have you opened there?
(If you want to compile 0.2.8, you need the matching 0.2.8-winlibs and that really old 1.0 release candidate code::blocks.)

Well the version I have in the picture is an older version of 0.4 but the newer and older versions fail regardless
Post Reply