VC8 doesn't seem to like svn-11820, cmd/basecomputer.cpp:3184, complaining about the implicit conversion involved in passing &datesort to scandir().
Changing both of datesort()'s parameters (line 3158) from "const void *" to "const struct dirent**" stops the compiler complaining; the basescreen load/save seems to behave ok when built this way, though the initial casts in datesort() become redundant.
The main menu's load game screen still appears to sort saves alphabetically, though...
(Incidentally, I notice that safemode's collider work has gone into trunk for testing, but there hasn't been an updated version of the vega-vc* project files to use the new code yet. Is testing under windows required?)
vega-vc8: compilation error
-
- Lead Network Developer
- Posts: 2560
- Joined: Sun Jan 12, 2003 9:13 am
- Location: Palo Alto CA
- Contact:
Argh -- that really bugs me.
Here's the manpage on scandir in Linux
int(*compar)(const struct dirent **, const struct dirent **)
But when I compile using dirent** I get this message:
For the collide stuff you probably aren't going to be able to get it to compile in Windows today. I'll make it a point to boot up to windows tomorrow and get these problems solved.
Yes, I only fixed half the code. One of the load screens is written in Python, the other is in C++. So I still need to fix it.
-Patrick
Here's the manpage on scandir in Linux
int(*compar)(const struct dirent **, const struct dirent **)
But when I compile using dirent** I get this message:
Same thing happens on the Mac. I guess I need to do an ifdef _WIN32, or else accept that linux and mac will always have a warning there.warning: invalid conversion from ‘int (*)(const dirent**, const dirent**)’ to ‘int (*)(const void*, const void*)’
For the collide stuff you probably aren't going to be able to get it to compile in Windows today. I'll make it a point to boot up to windows tomorrow and get these problems solved.
Yes, I only fixed half the code. One of the load screens is written in Python, the other is in C++. So I still need to fix it.
-Patrick
-
- Trader
- Posts: 22
- Joined: Thu Jan 31, 2008 7:06 pm
Cheap hack of a solution...
I found scandir() is already declared in a win32 ifdef... so I changed the emulation function signature to match the way you say Linux is behaving.
Builds with no more than the usual number of warnings, save/load screen seems to work ok.
(TortoiseSVN-generated patch attached.)
I found scandir() is already declared in a win32 ifdef... so I changed the emulation function signature to match the way you say Linux is behaving.
Builds with no more than the usual number of warnings, save/load screen seems to work ok.
(TortoiseSVN-generated patch attached.)
You do not have the required permissions to view the files attached to this post.
-
- Lead Network Developer
- Posts: 2560
- Joined: Sun Jan 12, 2003 9:13 am
- Location: Palo Alto CA
- Contact:
I committed a different fix to svn since I forgot to check the forums.
I actually didn't realize that a WIN32 version of scandir was written directly in the code in vsfilesystem.cpp
It seems that the manpage and the actual system headers conflict, and I don't see any right way of doing this, so for now I just have a typedef.
I actually didn't realize that a WIN32 version of scandir was written directly in the code in vsfilesystem.cpp
It seems that the manpage and the actual system headers conflict, and I don't see any right way of doing this, so for now I just have a typedef.
-
- Lead Network Developer
- Posts: 2560
- Joined: Sun Jan 12, 2003 9:13 am
- Location: Palo Alto CA
- Contact:
-
- Explorer
- Posts: 11
- Joined: Sun Feb 10, 2008 10:06 pm
- Location: Germany