Problems Compiling latest Styctap on Win (Codeblocks)

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
Post Reply
User avatar
Cero
Posts: 4
Joined: Tue Oct 15, 2013 10:01 pm
Location: Styx, Underworld

Problems Compiling latest Styctap on Win (Codeblocks)

Post by Cero »

So for quite some time now I've been attempting to compile the latest version of armagetron advanced sty+ct+ap as it has some pretty neat Windows-only features like pasting copied information. My goal is to build an exe file, which I have had no luck doing on Linux.

The program I'm using for building +ap on Windows is Code:Blocks 10.05 w/ MingW.

When I build the workspace it begins compiling nearly all the source files but fails during SDL building. Now, I downloaded and linked the SDL libraries and partially fixed the problem...

Image

Image

...yet it stills spews errors.

Image

I spent a ton of time looking up what I was doing wrong, and I'm pretty sure I've found what the issue is. I need to download and link the SDL_mixer and SDL_image libs. I did so, but when I attempt to link them using "lSDL_mixer" and "lSDL_image"...

Image

Image

...it claims it doesn't understand such terms and compiling fails.

Image

What am I doing wrong? Much appreciated.
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Problems Compiling latest Styctap on Win (Codeblocks)

Post by Z-Man »

Compiling on Windows is the fifth circle of hell. Welcome to it.
What you're doing wrong is using Code::Blocks 10.05; current bzr sources require 13.12. IIRC, the main change from one to the other for us was the way compiled libraries are named, that would be why compiling and linking SDL fails.
Don't ever download binary libraries unless the documentation says you should, and if it says so, stick to the precise version stated. The binaries need to match the headers and the used compiler version. So if you're using the wrong code::blocks and download SDL 1.2.13 while the headers in winlibs (that you probably would still be using, of course you can correct that) are from 1.2.10, you can't expect it to work.

Aside: Microsoft tools are a little better in one regard: They have only a limited set of compiler versions you need to worry about, essentially one per VS release, and each VS comes with all previous compilers. So using the latest VS is never wrong. HOWEVER, there are six or eight potentially incompatible ways to configure compilation for each compiler version, you need to match those variants between libraries and your project. That's fun, especially if libraries are binary only.
User avatar
Light
Reverse Outside Corner Grinder
Posts: 1667
Joined: Thu Oct 20, 2011 2:11 pm

Re: Problems Compiling latest Styctap on Win (Codeblocks)

Post by Light »

Don't know if the AP branch kept it working, but I've honestly found it easier to cross-compile from Linux than going through Code Blocks. If it does still work, there's a handy "unixbuild" file, or something like that. Just gotta make sure you set up your file structure properly, which can be the most annoying part, but you get pretty specific errors to work with.

Then Code Blocks in WINE was a whole different nightmare. I remember in the past CB files were set up to make building in Windows much easier, but it seems to have changed over time.
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Problems Compiling latest Styctap on Win (Codeblocks)

Post by Z-Man »

There's a unixbuild script that works without Code::blocks on Wine? Where? I've always used the Code::Blocks one (in win32, iirc) that I wrote myself for lack of better ideas
User avatar
Light
Reverse Outside Corner Grinder
Posts: 1667
Joined: Thu Oct 20, 2011 2:11 pm

Re: Problems Compiling latest Styctap on Win (Codeblocks)

Post by Light »

Z-Man wrote:There's a unixbuild script that works without Code::blocks on Wine? Where? I've always used the Code::Blocks one (in win32, iirc) that I wrote myself for lack of better ideas
I realized after I wrote that, that it uses Code Blocks in WINE. I forgot. lol I set it up a while ago and kind'a forgot about it.
User avatar
Cero
Posts: 4
Joined: Tue Oct 15, 2013 10:01 pm
Location: Styx, Underworld

Re: Problems Compiling latest Styctap on Win (Codeblocks)

Post by Cero »

Alright, so I tried Z-Man's suggestion and I got way farther than I could have without it. It's even begun creating the exe file. Now, the only issue I'm currently having is this:

Image


I have no clue what this means. Please help :)
User avatar
Cero
Posts: 4
Joined: Tue Oct 15, 2013 10:01 pm
Location: Styx, Underworld

Re: Problems Compiling latest Styctap on Win (Codeblocks)

Post by Cero »

Well, it does look like it has successfully built the most targets however I'll still like to know what occurred on last target building. :P


Edit: I have exes for dedicated and master but cannot locate the actual client exe. Probably due to the errors.
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Problems Compiling latest Styctap on Win (Codeblocks)

Post by Z-Man »

Readable screenshots next time, please.
How did you get your winlibs? The only way that can work is if you take the current 0.2.8 one: https://code.launchpad.net/~armagetrona ... nlibs-work. If you already have that, do a full rebuild; you may have temp files from your past adventures with the older code::blocks left.

From what I can make out, the errors look a bit familiar. I think they're what made me go for binary distributions of SDL for the 0.4 branch. Could also have been that I didn't want to bother with updating the projects, they're a bit of a hack.
User avatar
LOVER$BOY
Match Winner
Posts: 731
Joined: Thu Jan 24, 2008 12:46 pm

Re: Problems Compiling latest Styctap on Win (Codeblocks)

Post by LOVER$BOY »

I know it's late by (2017 so...) four years but... I finally got around to updating the code blocks project files for 0.2.9-sty+ct+ap if that pleases anyone. :)

The latest windows code blocks it supports is: Code Blocks 20.03mingw

Process is still the same as usual: (directory view)
- armagetronad
- build_codeblocks
- winlibs

build_codeblocks: https://code.launchpad.net/~armagetrona ... locks-work
winlibs: https://code.launchpad.net/~armagetrona ... nlibs-work

P.S. It too me 2-3 days to work out everything since I have become rusty. :P
Image
User avatar
Galaxip
Core Dumper
Posts: 120
Joined: Wed Aug 24, 2016 10:49 pm
Contact:

Re: Problems Compiling latest Styctap on Win (Codeblocks)

Post by Galaxip »

good job, well done
Image Image Image Image
User avatar
LOVER$BOY
Match Winner
Posts: 731
Joined: Thu Jan 24, 2008 12:46 pm

Re: Problems Compiling latest Styctap on Win (Codeblocks)

Post by LOVER$BOY »

Thank you. :)
Image
User avatar
LOVER$BOY
Match Winner
Posts: 731
Joined: Thu Jan 24, 2008 12:46 pm

Re: Problems Compiling latest Styctap on Win (Codeblocks)

Post by LOVER$BOY »

For future windows users needing to compile in windows using the 20.03mingw x64, I've made a batch files just for you without you needing to open codeblocks (unless something is broken and you really need to open codeblocks). XD

I've pushed it into the 0.2.9+ap-build-codeblocks-work as of revision 3, so it's accessible to everyone. I'm also attaching them in a compressed rar file format here just for some kind of magic, I guess? You'll understand what I mean when you read the README-FIRST.txt =D

Why did I do this? I realized when Nelg messaged me saying someone was facing some issue, and I was feeling bored so I decided to do this small bit of help for the windows users since most programmers here build on linux but not sure as it's been over 7 years since
I last interacted with anyone on the forums. I did say I retired from tron so there's that.

If you face any problems, message Nelg. If he can't help, he knows where to find me. =)

Enjoy~!
Attachments
windows_builder.rar
This is from 0.2.9+ap-build-codeblocks-work rev 3
(3.98 KiB) Downloaded 99 times
Image
Post Reply