Getting .90 to compile on linux
I haven't tried v91, but that iterator thing was in earlier versions, too. In v63a:
#if defined(_MSC_VER) || defined(__GNUC__)
#include "autosegs.h"
TypeInfo DObject::_StaticType =
{
"DObject",
NULL,
sizeof(DObject),
};
void TypeInfo::StaticInit ()
{
TAutoSegIterator<TypeInfo *, &CRegHead, &CRegTail> probe;
while (++probe != NULL)
{
probe->RegisterType ();
}
}
#else
TypeInfo DObject::_StaticType(NULL, "DObject", NULL, sizeof(DObject));
#endif
And mingw's gcc (3.2.3) compiled it.
#if defined(_MSC_VER) || defined(__GNUC__)
#include "autosegs.h"
TypeInfo DObject::_StaticType =
{
"DObject",
NULL,
sizeof(DObject),
};
void TypeInfo::StaticInit ()
{
TAutoSegIterator<TypeInfo *, &CRegHead, &CRegTail> probe;
while (++probe != NULL)
{
probe->RegisterType ();
}
}
#else
TypeInfo DObject::_StaticType(NULL, "DObject", NULL, sizeof(DObject));
#endif
And mingw's gcc (3.2.3) compiled it.
Well, all I can think of is either there's a #ifdef missing or misplaced somewhere or gcc has taken another turn. I'm not following the Linux world, but I guess gcc on Linux could be up to 3.4 or 3.5 version, breaking somewhere some compatibility with older versions, like that of mingw's. Provided mingw can build v91 at all, not just v63a. I haven't tried it, it's a pain in the ass compiling ZDoom on a 560MHz Celeron CPU...
hey guys, nice to see another effort in the portability department. before i start i'm just going to say i wish i could help (meaning i have no knowlege of c++, or c) but thats not possible at this point in time. however while i'm running freebsd i would like the chance to take some of the code you have hacked and try to build it. however this could only happen by building it without fmod, as fmod isn't as portable as they claim
on the other hand, there is the possibility of running the linux binary straight up, which for the most part works great with other linux binaries suck as quake3 and doom3, but the closest thing to zdoom, which is zdaemon, segfaults. the third closest thing to zdoom, skulltag, has a linux binary that _does_ run but has some weird issue where it goes sorta slow motion (lord only knows) anyway, good luck.
- ryan

- ryan
Huh! That's funny... I've always had an avatar since Randy switched to the new forums...Psycho Siggi wrote:I find it kinda funny that all the linux users don't have an avatar.
I'm running Debian Testing/SID kernel 2.6.8 on a PPC. I'd try and offer help along with the others, but ZDoom isn't exactly set up for the PPC architecture.
-M.
- Chris
- Posts: 2971
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
It should be possible to make FMOD disable-able.. although you'll get no sound unless compatible SDL code is written. And even then, you might have to do without music.ryan wrote:hey guys, nice to see another effort in the portability department. before i start i'm just going to say i wish i could help (meaning i have no knowlege of c++, or c) but thats not possible at this point in time. however while i'm running freebsd i would like the chance to take some of the code you have hacked and try to build it. however this could only happen by building it without fmod, as fmod isn't as portable as they claim ;)
But we'll keep at it. Hopefully something will turn up to clear out this mystery.
- Chris
- Posts: 2971
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Update:
In a PM, randy mentioned that my wildcard search was probably the culprit, since two of the files need to be linked in the proper order.. autostart.o first and autozend.o last. I modified the makefile slightly and that was indeed the case. Modify the makefile so that autostart.o is listed first and autozend.o is listed last.
Also, there's some source modifications that need to be made. First is in infodefaults.cpp, line 128:
Also, while compiling you might have noticed a couple errors like this:
EDIT:
It works! I successfully played through Doom2 MAP01 and killed the three zombies in MAP02. There seems to be some general bugginess with setting the keys in the in-game menu, though.. and trying to play with sound crashes my system. But it does run.
In a PM, randy mentioned that my wildcard search was probably the culprit, since two of the files need to be linked in the proper order.. autostart.o first and autozend.o last. I modified the makefile slightly and that was indeed the case. Modify the makefile so that autostart.o is listed first and autozend.o is listed last.
Also, there's some source modifications that need to be made. First is in infodefaults.cpp, line 128:
Code: Select all
while ((defnum = *(WORD *)parser) != ADEF_EOL)
/* change this to */
while ((defnum = *(WORD *)parser) != ADEF_EOL && defnum != 0)
This is fatal! I'm currently in the process of fixing it myself, so I'll report back. Apparently this only occurs in src/v_draw.cpp, lines 230 and 238. As the warning says, change bool to int.warning: `bool' is promoted to `int' when passed through
`...'
warning: (so you should pass `int' not `bool' to `va_arg')
EDIT:
It works! I successfully played through Doom2 MAP01 and killed the three zombies in MAP02. There seems to be some general bugginess with setting the keys in the in-game menu, though.. and trying to play with sound crashes my system. But it does run.
Well, did a build on mingw:
C/C++ only, without optimization.
Just 3 errors during compiling:
-eaxedit.cpp
#ifndef OFN_ENABLESIZING was interfering, it was in v63a also.
-p_doors.cpp EV_SlidingDoor: jumping into a loop.
-d_main.cpp D_DoStrifeAdvanceDemo: invalid conv. from const char * to char *.
Some minor stuff as well: HAVE_STRUPR, HAVE_FILELENGTH needed to be defined.
However the exe fails: Unknown class <chinese stuff> in TeleportFog's default list.
I guess that's the error you were getting on Linux.
I'll try that autostart/autozend trick, once I figure out how to do it with visula-mingw.
C/C++ only, without optimization.
Just 3 errors during compiling:
-eaxedit.cpp
#ifndef OFN_ENABLESIZING was interfering, it was in v63a also.
-p_doors.cpp EV_SlidingDoor: jumping into a loop.
-d_main.cpp D_DoStrifeAdvanceDemo: invalid conv. from const char * to char *.
Some minor stuff as well: HAVE_STRUPR, HAVE_FILELENGTH needed to be defined.
However the exe fails: Unknown class <chinese stuff> in TeleportFog's default list.
I guess that's the error you were getting on Linux.
I'll try that autostart/autozend trick, once I figure out how to do it with visula-mingw.
- Chris
- Posts: 2971
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Basically, yeah (sans OFN_ENABLESIZING, HAVE_STRUPR, and HAVE_FILELENGTH). And after I fixed the link-order problem, I got a similar failure like you did about unknown class <blank> in something's default list. It seems to be some kind of bug in FActorInfo::ApplyDefaults because the first time I ran it without the check-for-0 change, it said Cajun's default list, the next it said the Arachnotron's, and the third it segfaulted.rpeter wrote:Well, did a build on mingw:
C/C++ only, without optimization.
Just 3 errors during compiling:
-eaxedit.cpp
#ifndef OFN_ENABLESIZING was interfering, it was in v63a also.
-p_doors.cpp EV_SlidingDoor: jumping into a loop.
-d_main.cpp D_DoStrifeAdvanceDemo: invalid conv. from const char * to char *.
Some minor stuff as well: HAVE_STRUPR, HAVE_FILELENGTH needed to be defined.
However the exe fails: Unknown class <chinese stuff> in TeleportFog's default list.
I guess that's the error you were getting on Linux.
I do hope Randy's still reading this thread.
That should only be needed for Linux. The Win32 port gets a handle to the program's module and reads the data sections directly. Though I personally think using the seperate data sections is ugly, and a better method would be to use resizeable vectors that are filled before (win)main is run.I'll try that autostart/autozend trick, once I figure out how to do it with visula-mingw.