EDIT: concerning the mingw libraries

EDIT: concerning the mingw libraries

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
Super Mario
Posts: 823
Joined: 21 Oct 2008, 02:54

EDIT: concerning the mingw libraries

Post by Super Mario »

rather it's part of the library of functions provided by the gnu extension. It's prevents me from compiling the engine because of this, as the my current installation of mingw doesn't have this function in the <string.h> header file.We shouldn't rely features provided by the gnu extensions, because that will tie the engine down to linux/unix base systems. I going to do some research on what is a good replacement for this.
Information about this function is provided here.

after more digging, I find out that the 32bit version of the mingw64 doesn't have this function while the 64 bit does.


Edit2: I did a patch job to cmake after researching old posts concerning this, it's compiles and runs and all, by forcing it to compile for 32 bit version. It's bit counter intuitive to have people download the 32 bit verison of mingw when it doesn't have the function requires for it. I'm using tdm version of it btw.

What libraries in mingwlib need to upgrade to 64 bit? As is it stands not having it is creating issues, as the mingw64 32bit doesn't have the necessarily functions to compile spring(From the current compiler that I have anyway)
Last edited by Super Mario on 02 Jan 2015, 20:18, edited 7 times in total.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: strnlen is not part of the offical std libary

Post by smoth »

Why are you asking what "we" need to do when the compile error is on your end? Why not wait and see if someone can offer a solution before you suggest changes to the code?
Super Mario
Posts: 823
Joined: 21 Oct 2008, 02:54

Re: strnlen is not part of the offical std libary

Post by Super Mario »

smoth wrote:Why are you asking what "we" need to do when the compile error is on your end?
Not everyone use the same compiler. There more than one version mingw64 as far as I know.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: strnlen is not part of the offical std libary

Post by smoth »

Super Mario wrote:
smoth wrote:Why are you asking what "we" need to do when the compile error is on your end?
Not everyone use the same compiler. There more than one version mingw64 as far as I know.
So why does the code need to be altered for YOUR compiler? is it your compiler that is the issue or the libraries or maybe you are using the wrong settings. who knows, I don't.
Super Mario
Posts: 823
Joined: 21 Oct 2008, 02:54

Re: EDIT: concerning the mingw libraries

Post by Super Mario »

smoth wrote:
Super Mario wrote:
smoth wrote:Why are you asking what "we" need to do when the compile error is on your end?
Not everyone use the same compiler. There more than one version mingw64 as far as I know.
So why does the code need to be altered for YOUR compiler?
So that it compiles spring.
is it your compiler that is the issue or the libraries or maybe you are using the wrong settings. who knows, I don't.
I have already figure out. My 32 bit version doesn't have the function in the <string.h> file, so I have to use the 64 bit version. I have to force the 64 bit to compile for 32 bit by modifying the cmake file to pass the -m32 flag.

What's with the unnecessarily hostility anyways? Calm down.
Last edited by Super Mario on 02 Jan 2015, 22:30, edited 1 time in total.
lamer
Posts: 153
Joined: 08 Mar 2014, 23:13

Re: EDIT: concerning the mingw libraries

Post by lamer »

Using another compiler for spring is usually not the best idea, because of great desync.
I'd suggest first create fully working and tested setup with your config/compiler and then suggest/provide patches. IMHO.
Super Mario
Posts: 823
Joined: 21 Oct 2008, 02:54

Re: EDIT: concerning the mingw libraries

Post by Super Mario »

lamer wrote:Using another compiler for spring is usually not the best idea, because of great desync.
I'd suggest first create fully working and tested setup with your config/compiler and then suggest/provide patches. IMHO.
If I wanted to play with other people online, then I would have download the pre-build binaries.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: EDIT: concerning the mingw libraries

Post by abma »

@Super Mario:

did you follow these instructions to compile spring?

http://springrts.com/wiki/Building_Spring_on_Windows

if not, then you very likely will hit problems like you already wrote. others maybe can help you when write your specific problem when you provide exact information what you did and what error message you get.

the only (known) working compiler on windows is MinGW-w64, anything else very likely will fail at some point.
Super Mario
Posts: 823
Joined: 21 Oct 2008, 02:54

Re: EDIT: concerning the mingw libraries

Post by Super Mario »

abma wrote:@Super Mario:

did you follow these instructions to compile spring?

http://springrts.com/wiki/Building_Spring_on_Windows

if not, then you very likely will hit problems like you already wrote. others maybe can help you when write your specific problem when you provide exact information what you did and what error message you get.

the only (known) working compiler on windows is MinGW-w64, anything else very likely will fail at some point.
I fix the problem by modifying the cmake file, please see my pull request under user name 12345swordy.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: EDIT: concerning the mingw libraries

Post by abma »

Post Reply

Return to “Engine”