Windows compytibility

Windows compytibility

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
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Windows compytibility

Post by submarine »

Right at the beginning of file LuaIO.cpp there is

#include <unistd.h>

However, this is a unix-only header file, therefore it will not compile with microsoft c++ compiler (vs.net2003/05). Can we replace that?

After commenting it out, I could compile it anyway (but got some compile errors later on in other files, so I dont know if spring will run without it..)
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Windows compytibility

Post by imbaczek »

#ifdef it out for VC++.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Windows compytibility

Post by AF »

what does unistd.h do?
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Windows compytibility

Post by imbaczek »

it has POSIX #defines, functions and generally stuff. things like fork, exec, chdir, etc. gcc on windows provides this file BTW.
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Re: Windows compytibility

Post by submarine »

imbaczek wrote:gcc on windows provides this file BTW.
Yep I know it's only a microsoft c++ compiler issue, thats why is used #ifndef _MSC_VER instead of WIN_32
Post Reply

Return to “Engine”