Question about source.

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
boris
Posts: 781
Joined: Tue Jul 15, 2003 3:37 pm

Post by boris »

User avatar
Bio Hazard
Posts: 4019
Joined: Fri Aug 15, 2003 8:15 pm
Location: ferret ~/C/ZDL $
Contact:

Post by Bio Hazard »

k, i'll check that out after i get some sleep (i cant sleep and it's 04:00 :( )
boris
Posts: 781
Joined: Tue Jul 15, 2003 3:37 pm

Post by boris »

Got it to compile even further. Next problem appears in i_movie.cpp. Apparently you have to #include wtypes.h. Without doing so, I got error messages worth 220kb of plain text ;) However, even when including wtypes.h I get an error:

Code: Select all

In file included from c:/programming/MinGW-3.1.0-1/include/dshow.h:46, from src/win32/i_movie.cpp:68:
c:/programming/MinGW-3.1.0-1/include/strmif.h:6166: redefinition of `struct _RGNDATAHEADER'
c:/programming/MinGW-3.1.0-1/include/wingdi.h:2060: previous definition of `struct _RGNDATAHEADER'
c:/programming/MinGW-3.1.0-1/include/strmif.h:6175: redefinition of `struct _RGNDATA'
c:/programming/MinGW-3.1.0-1/include/wingdi.h:2067: previous definition of ` struct _RGNDATA'
c:/programming/MinGW-3.1.0-1/include/strmif.h:20557: `IID_IAMFilterGraphCallback' was not declared in this scope
c:/programming/MinGW-3.1.0-1/include/strmif.h:20557: initializer list being treated as compound expression
c:/programming/MinGW-3.1.0-1/include/strmif.h:28736: declaration of `GUID tagVMRGUID::GUID'
c:/programming/MinGW-3.1.0-1/include/winnt.h:1293: changes meaning of `GUID' from `typedef struct _GUID GUID'
Defining I_DO_NOT_LIKE_BIG_DOWNLOADS "fixes" the problem.

Next I get this:

Code: Select all

make: *** No rule to make target `obj/sdlvideo.o', needed by `zdoom'.  Stop.
I fixed this by simply adding src/sdl at the end of VPATH in the makefile, is that the right solution?

Then I get a bunch of other errors, of which some (the strlwr and dlfcn.h ones) appeared earlier in this thread:

Code: Select all

In file included from src/sdl/sdlvideo.cpp:7:
src/sdl/i_system.h: In function `void strlwr(char*)':
src/sdl/i_system.h:219: new declaration `void strlwr(char*)'
c:/programming/MinGW-3.1.0-1/include/string.h:168: ambiguates old declaration `char* strlwr(char*)'
src/sdl/i_system.h:219: `void strlwr(char*)' was declared `extern' and later `static'
c:/programming/MinGW-3.1.0-1/include/string.h:168: previous declaration of `char* strlwr(char*)'
In file included from src/sdl/sdlvideo.cpp:7:
src/sdl/i_system.h:243:19: dlfcn.h: No such file or directory
src/sdl/i_system.h: In constructor `Dl_IFace::Dl_IFace(const char*)':
src/sdl/i_system.h:254: `RTLD_LAZY' undeclared (first use this function)
src/sdl/i_system.h:254: (Each undeclared identifier is reported only once for each function it appears in.)
src/sdl/i_system.h:254: `dlopen' undeclared (first use this function)
src/sdl/i_system.h:259: `dlsym' undeclared (first use this function)
src/sdl/i_system.h:266: `dlclose' undeclared (first use this function)
src/sdl/i_system.h:273: `dlerror' undeclared (first use this function)
src/sdl/sdlvideo.cpp: In member function `virtual DFrameBuffer* SDLVideo::CreateFrameBuffer(int, int, bool, DFrameBuffer*)':
src/sdl/sdlvideo.cpp:242: cannot allocate an object of type `SDLFB'
src/sdl/sdlvideo.cpp:242:   because the following virtual functions are abstract:
src/v_video.h:257:      virtual void DFrameBuffer::PaletteChanged()
src/v_video.h:258:      virtual int DFrameBuffer::QueryNewPalette()
make: *** [obj/sdlvideo.o] Error 1
Now I'm stuck :oops:
User avatar
Chris
Posts: 2982
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Post by Chris »

I fixed this by simply adding src/sdl at the end of VPATH in the makefile, is that the right solution?
No. The Windows side doesn't use SDL. I could've sworn I removed the SDL-related targets, but I guess I missed it. Here's an updated Makefile:
boris
Posts: 781
Joined: Tue Jul 15, 2003 3:37 pm

Post by boris »

Yay, all objects build with that makefile. However, zdoom.exe is not built. I tried to build it by hand (g++ obj\*.o -o zdoom.exe -lFLAC++ -lFLAC -lfmod -lz) but that results in a roflzillion undefined references, I guess that's because I'm not linking with the required libs.

After googling a bit for the error messages I found out that following libs are needed, too:
-lwsock32 -lwinmm -ldsound -ldxguid -ldinput8 -lole32 -luser32 -lgdi32 -lcomctl32

There are, however, a couple undefined references I can't solve:

Code: Select all

Win32Video::Win32Video(int)
FHelperThread::FHelperThread()
FHelperThread::LaunchThread()
FHelperThread::~FHelperThread()
FHelperThread::DestroyThread()
FHelperThread::SendMessageA(unsigned long, unsigned long, unsigned long, unsigned long, bool)
EAXEditWindow
ShowEAXEditor()
vid_palette
vid_attachedsurfaces
User avatar
Unconscious
Posts: 35
Joined: Tue Dec 28, 2004 1:11 pm

Post by Unconscious »

Heh, Major thread hijack.
User avatar
Chris
Posts: 2982
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Post by Chris »

This hopefully should do it...
boris
Posts: 781
Joined: Tue Jul 15, 2003 3:37 pm

Post by boris »

Chris wrote:This hopefully should do it...
It also needs comdlg32 ;) But then if finally compiled :D

Anyway, to get it to compile I had to make a couple changes to the source, here's a list of them:
  • sound/altsoundmixer.cpp: MinGW doesn't know "__forceinline". Fixed (at least the compiler error ;) ) by adding "-D__forceinline=" to the compiler flags
  • win32/i_input.cpp: MinGW doesn't know "WM_XBUTTONDOWN" and "WM_XBUTTONUP". I googled for it and then added the following code at the other #ifndef's at the top of the file:

    Code: Select all

    #ifndef WM_XBUTTONDOWN
    #define WM_XBUTTONDOWN 0x020B
    #define WM_XBUTTONUP 0x20C
    #endif
    
  • I had some problems with i_movie.cpp. Apparently you have to include wtypes.h even before c_cvars.h, else you get a lolzillion errors. But when I include it, I get a bunch of errors :roll:

    Code: Select all

    In file included from c:/programming/MinGW-3.1.0-1/include/dshow.h:46, from src/win32/i_movie.cpp:66:
    c:/programming/MinGW-3.1.0-1/include/strmif.h:6166: redefinition of `struct _RGNDATAHEADER'
    c:/programming/MinGW-3.1.0-1/include/wingdi.h:2060: previous definition of `struct _RGNDATAHEADER'
    c:/programming/MinGW-3.1.0-1/include/strmif.h:6175: redefinition of `struct _RGNDATA'
    c:/programming/MinGW-3.1.0-1/include/wingdi.h:2067: previous definition of `struct _RGNDATA'
    c:/programming/MinGW-3.1.0-1/include/strmif.h:20557: `IID_IAMFilterGraphCallback' was not declared in this scope
    c:/programming/MinGW-3.1.0-1/include/strmif.h:20557: initializer list being treated as compound expression
    c:/programming/MinGW-3.1.0-1/include/strmif.h:28736: declaration of `GUID tagVMRGUID::GUID'
    c:/programming/MinGW-3.1.0-1/include/winnt.h:1293: changes meaning of `GUID' from `typedef struct _GUID GUID'
    
    But the whole thing can be bypassed by defining I_DO_NOT_LIKE_BIG_DOWNLOADS. I don't think movie playing in ZDoom is important (at the moment?) anyway
User avatar
Chris
Posts: 2982
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Post by Chris »

boris wrote:
Chris wrote:This hopefully should do it...
It also needs comdlg32 ;) But then if finally compiled :D
And ran, I hope? ;)
Anyway, to get it to compile I had to make a couple changes to the source, here's a list of them:
Noted and applied. :) __forceinline may be better declared inline, instead of nothing though.
But the whole thing can be bypassed by defining I_DO_NOT_LIKE_BIG_DOWNLOADS. I don't think movie playing in ZDoom is important (at the moment?) anyway
[/list]
Right. And since movie playing isn't supported under Linux, I wouldn't recommend it being used, either.
boris
Posts: 781
Joined: Tue Jul 15, 2003 3:37 pm

Post by boris »

Chris wrote:And ran, I hope? ;)
Yes, it runs :)
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

That's pretty cool :)

Hey Chris, does Randy merge all these changes you've been making these last months, or do you have to do it all again everytime there is a new version?
User avatar
Chris
Posts: 2982
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Post by Chris »

Hey Chris, does Randy merge all these changes you've been making these last months, or do you have to do it all again everytime there is a new version?
Randy doesn't seem keen on applying my changes, although this last version (actually, 95 I think.. can't think properly right now) had some of my changes to the SPC-related stuff.

I pretty much just apply the patch from the last version on the new version and pray. ;) Sometimes it goes flawless, others it'll spit some warnings but work anyway, others I need to go in and tweak things a bit. But I've never had to completely redo it between versions, yet. :)
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

Some kind of official lunix version would be nice though, might convince me to switch on the linux box thats been collecting dust in the corner of my room since I put it together :/
boris
Posts: 781
Joined: Tue Jul 15, 2003 3:37 pm

Post by boris »

Well, the code has some #ifdef's for different compilers, doesn't it? As Chilvence said, an official Linux version would be cool (not that I use it, heh).
User avatar
Chris
Posts: 2982
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Post by Chris »

I have no problem with Randy merging my changes. The main problems seem to be fixed. The only reason I can think of that he isn't is that he has no way to test it himself, and he'd get hit with bug reports he coudn't properly handle or test.
Post Reply

Return to “General”