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: 11424
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: 1664
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: 11424
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: 1664
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: 11424
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.

Post Reply