Compiling wiht newer version of MingW?

BlitzMax Forums/BlitzMax Module Tweaks/Compiling wiht newer version of MingW?

RepeatUntil(Posted 2006) [#1]
I am wrapping now RakNet (http://www.rakkarsoft.com/) for BlitzMax, an incredible networking library. This work benefits a lot of the wrapper did in Blitz3D by Kurix.
I am able to compile it and run it with an old version of RakNet.

BUT for a recent version of RakNet, I can not compile it, I got an error, and I found that the problem was coming from the version of MingW. With version MingW3.1.0 (the one used by BlitzMax), I doesn't compile, while with MingW 5.x.x, this is compiling fine!
The problem is that Mark Sibly said (http://www.blitzmax.com/Community/posts.php?topic=53442) that we shoud stick with version 3.1.0, and not try to go to a more recent version...

What can I do?? I need MingW 5.x.x to compile RakNet. I don't want to break BlitzMax, in particular I need the same version of the compiler for every modules (otherwise it would be messy, if only it worked).

So could we use MingW 5.x.x or is it really not recommended? If not, could we move to a more recent of version for BlitzMax and all modules?? What solutions do I have here?????
Thanks!


Floyd(Posted 2006) [#2]
As far as I know it is the linker which is incompatible.

The format of precompiled libraries sometimes changes with a new version of MingW. If you have the source code to everything you are using then you may be able to recompile everything with whatever version is working for RakNet. You would have to rebuild BlitzMax's modules with this version as well.

I've never tried this, so I can't say how likely it is to work. This is more or less what you already said.

The only good point is that it is fairly easy to experiment with alternate versions of BlitzMax. I have desktop shortcuts to several of them. They all use the same MingW / fasm. But if they didn't I would just need to change some environment variables to switch between them.


RepeatUntil(Posted 2006) [#3]
Yes, I thought about this solution (recompiling every modules with the latest version of MingW), but the problem is that EVERY users of the RakNet wrapper will have to do the same: recompile every modules, just because they are using RakNet. This is very user UNfriendly!!


Dreamora(Posted 2006) [#4]
But in the end the only way if you want to use an imcompatible compiler ...


RepeatUntil(Posted 2006) [#5]
I recompiled all modules with MingW 5.x.x, and everything went fine, and I was able to run the samples coming with BlitzMax. So, if this is working, then why we don't ALL migrate to MingW 5.x.x??? What would be the drawback for BRL???? BRL, any comments!

And another question: what if 1 module (RakNet) is compiled with MingW 5.x.x and all the others with MingW3? (not giving the source of RakNet to avoid recompilation!)


Dreamora(Posted 2006) [#6]
Because MaxGUI extremely bugs with the newer versions of GCC ...

And if only the RakNet is compiled from a newer, you will most likely need to use the newer MingW due to the changed linker ... but you could test it and see if it works. It can't go any worse than telling you that the .a does not work or something :-)


RepeatUntil(Posted 2006) [#7]
For now, I compiled everything (RakNet + all other modules) with MinGW 5.x, and this is working perfectly. I don't have MaxGui to try to compile, so I can not say (maybe someone wants to try?).
I really think BRL should go to MinGW 5.x, and fix the MaxGUI code to allow this. I don't see any reasons why we shouldn't do that...

I will try also to compile RakNet with MinGW 5.x and other modules with MinGW 3.1.0, but what a complication (if only it works)!


Dreamora(Posted 2006) [#8]
naw not really. Just sync and manually build only the RakNet and you have that :-)