 |
|
J Bytheway
|
 |
England
Jul 2001 time: 05:31
|
|
quote: Originally posted by Solver
Very interesting. I went ahead to build the source, and got 111 errors. Then I changed the sound system files as John suggested, and got 118 errors on next build. |
Were they semantic or syntactic? I've managed to get past the syntax errors now, so I get a whole lot more semantic ones (Undeclared identifiers, etc.). Whereabouts are the errors occuring?
In any case the exact number of errors seems to be subject to significant random fluctuation...
Last edited by J Bytheway on 30-10-2003 at 04:12
|
|
|  |
 |
|  |
 |
|
J Bytheway
|
 |
England
Jul 2001 time: 05:31
|
|
Is it possible to run some kind of "inclusion trace" on the compiler - I want to know how it came to be compiling ctlutil.h, where the error is, starting from vidplay.cpp.
It seems to be through streams.h, but that includes control.h, where the base class is defined, before ctlutil.h, where it was found not to be defined.
Hmm... Why can't we port the whole thing to C#, and then we won't have to worry about these stupid #include statements or the order of declaration at all. They always make my head spin...
And since my head is spinning I think I'll go to bed, but I should probably document my changes to SoundManager.cpp, so I've attached a copy of the version I'm using - in addition to this I added a declaration of S32 to CivSound.h like the other two #defines.
(I added a .txt extension in order to be able to upload this without zipping it - so Locutus, could you possibly get .cpp and .h (and maybe .l and .y) approved as extensions - I suspect we may need them a lot)
Attachment: soundmanager.cpp.txt
This has been downloaded 11 time(s).
|
|
|  |
 |
|
J Bytheway
|
 |
England
Jul 2001 time: 05:31
|
|
Well, here are some references on the primary errors I am now getting - I cannot totally decipher any of them, I think because they refer to DX 8. They also mention "Platform SDK". Does anyone know what that is?
From http://www-personal.monash.edu.au/~...ch/DShowOpenCV/
quote: I get the following errors when compiling a directshow filter! Whats going on?
...
\MICROSOFT SDK\SAMPLES\MULTIMEDIA\DIRECTSHOW\BASECLASSES\wxut
il.h(530) : error C2061: syntax error : identifier 'DWORD_PTR'
\MICROSOFT SDK\SAMPLES\MULTIMEDIA\DIRECTSHOW\BASECLASSES\ctlu
til.h(437) : error C2504: 'IBasicVideo2' : base class undefined
\MICROSOFT SDK\SAMPLES\MULTIMEDIA\DIRECTSHOW\BASECLASSES\ctlu
til.h(904) : error C2146: syntax error : missing ';' before identifier 'm_dwAdvise'
\MICROSOFT SDK\SAMPLES\MULTIMEDIA\DIRECTSHOW\BASECLASSES\ctlu
til.h(904) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
\MICROSOFT SDK\SAMPLES\MULTIMEDIA\DIRECTSHOW\BASECLASSES\ctlu
til.h(904) : error C2501: 'm_dwAdvise' : missing storage-class or type specifiers
\MICROSOFT SDK\SAMPLES\MULTIMEDIA\DIRECTSHOW\BASECLASSES\amfi
lter.h(286) : error C2061: syntax error : identifier 'LONG_PTR'
\MICROSOFT SDK\SAMPLES\MULTIMEDIA\DIRECTSHOW\BASECLASSES\amfi
lter.h(953) : error C2504: 'IPinFlowControl' : base class undefined
...
ANS: -Aug2002- The include path for your directX SDK or Platform SDK must place first under tools/options/Directories/include |
This answer I simply cannot comprehend - it doesn't seem to be gramatically correct...
From http://www.funkaspuck.com/mailz/opendivx/msg00206.html
quote: That was the problem with DirectShow before version 8.
I fixed it by just erasing usage of these interfaces in the
header files. The 8 version works fine without any adjustment. |
Which essentially says that the video code needs to be rewritten - I may well try to outcomment it in the mean time since there aren't really many videos in CTP2.
From http://www.unibrain.com/support/dev...development.htm
quote: 2. I installed Fire-i™ and everything went fine all executables and the drivers are working. When I tried to compile the sample programs using VC++ I get: i) compiler errors like these: …error C2504: 'IBasicVideo2' : base class undefined …error C2146: syntax error : missing ';' before identifier 'm_dwAdvise' …error C2501: 'DWORD_PTR' : missing storage-class or type specifiers or, ii) linker errors like these: CameraInfo.obj : error LNK2001: unresolved external Symbol _IID_IAMVideoControl Controler.obj : error LNK2001: unresolved external Symbol _IID_IAMVideoControl CameraInfo.obj : error LNK2001: unresolved external Symbol_IID_ICaptureGraphBuilder2 Whats wrong ???
First of all you must install Platform SDK and DirectX8.0 SDK under the same directory, the default option is "c:\mssdk" from now this path will be reffered as (SDK root). Secondly you must build strmbasd.lib(debug version), or strmbase.lib(release version), "To use the base classes in MicrosoftR DirectShowR, you must build and link the base class library, located in the following directory: (SDK root)\Samples\Multimedia\DirectShow\BaseClasses Note Previous versions of the SDK included the libary as a binary file. With MicrosoftR DirectXR 8.0, you must build this library yourself if you plan to use the base classes."The above quotation is extracted from MS DirectX 8.0 help in: " DirectX 8.0(C++)\DirectShow\DirectShow Reference\DirectShow Base Classes\Using..." You can check it for more information on building the lib. After building that lib you must make sure to point the compiler to search for the header files in: "(SDK root)\Samples\Multimedia\DirectShow\BaseClasses" first, and "(SDK root)\include" second. To do that under VC++6 modify the project's preprocessor settings in "Additional Include directories" textbox in "Project®Settings®C++ Tab" or modify the VC++ global settings by setting the "Include files" in "Tools®Options®Directories Tab" so that the above mentioned paths to the header files are listed in the order mentioned. Also point the linker to search in: "(SDK root)\Samples\Multimedia\DirectShow\BaseClasses\De
bug" first, and "(SDK root)\lib" second. Again one way to do that is by adding the "(SDK root)\Samples\Multimedia\DirectShow\BaseClasses\De
bug" path in the"Library Files" directories of the "Tools®Options" dialog box under "Directories" tab on top of the list and "(SDK root)\lib" second. Also add strmbasd.lib in "Object/Libraries" textbox in "Project®Settings®Link Tab". You must make sure that the files in the above mentioned directories are the files used by the compiler since there are probably more than one versions of these libraries (like strmbasd.lib) and header files(like streams.h) scattered around in your system. |
This seems the most promising answer, but none of the directories mentioned in it exist in my installation of the SDK - perhaps that's because of the lack of the mysterious "Platform SDK".
Alternatively, I could just interperet this as saying that the wrong file is probably being included - something I will look into. In particular one relevant file is called control.h, and there could easily be many files of that name...
Anyway, I won't be doing any of this immediately, but I thought I'd check in. This seems to be turning into another one of those threads where I make more than half the posts, but I guess that doesn't hurt my post count . (Edit: If my count is correct my posts account for exactly half... )
|
|
|  |
 |
|  |
 |
|
DDowell
|
|
Västerås, Sweden
Nov 2001 time: 06:31
|
|
It is the control panel (usually accessable through the start menu yes).
But if you can set env. variables through it on the 98 I'm not sure of...
|
|
|  |
 |
|
J Bytheway
|
 |
England
Jul 2001 time: 05:31
|
|
You should be able to set environment variables at the command promt too, syntax is something like:
code: SET CDKDIR=C:\...
I suggest you search the windows help for "environment variable" (Or some German translations thereof...)
Last edited by J Bytheway on 31-10-2003 at 01:23
|
|
|  |
 |
|
DDowell
|
|
Västerås, Sweden
Nov 2001 time: 06:31
|
|
quote: Originally posted by Martin Gühmann
Looks like I just need a file were 'LPDIRECTDRAWENUMERATEEX' is properly defiened.
|
Or you can define it yourself as
code:
typedef HRESULT (__stdcall *LPDIRECTDRAWENUMERATEEX) (int (__stdcall *) (GUID*,LPSTR,LPSTR,LPVOID,HMONITOR),LPVOID,DWORD);
|
|
|  |
 |
|
Mr Ogre
|
|
Azeroth
Jan 1970 time: 05:31
|
|
Alright, so I managed to compile and link it from the downloaded source, so I'm fairly sure it all made it out intact .
I am using XP and DevStudio 6. Without referencing my own README, here's what I had to do:
Set CDKDIR. If in Win98/ME, doing it in autoexec.bat is correct. The syntax there is SET CDKDIR=C:\cygwin\bin
Get DirectX and DXMedia. I am using DirectX 9, no problems.
MAKE SURE THE INCLUDE PATHS FOR DIRECTX AND DXMEDIA COME FIRST IN YOUR SETTINGS. That is very important, especially for DirectX. If you don't do this step, you will get the wrong version of ddraw.h, the one that's included with VC++ 6.0 is horribly outdated. Go to Tools->Options->Directories, Include Files, and put C:\DXSDK\Include at the top of the list, and just under it, add c:\DXMedia\include and then c:\DXMedia\classes\base. That assumes you installed them to DXSDK and DXMedia.
Copy the libraries into the ctp2 libs folder:
copy c:\dxsdk\lib\*.lib (ctp2_src)\libs\directx\lib
copy c:\dxmedia\lib\*.lib (ctp2_src)\libs\dxmedia\lib
(I actually just copied all of dxmedia there, but I think you only need the lib directory)
Remove the mss lib from the project settings. Project->Settings->Link, find ..\libs\miles\mss32.lib and remove it.
In CivSound.h, comment out #include "mss.h". Add this:
typedef void *HAUDIO;
In SoundManager.h, add this:
typedef void *HREDBOOK;
In civsound.cpp and soundmanager.cpp, remove the bodies of all the functions. (Leave return values in for non-void functions)
Make the temp directory for byacc (c:\tmp)
That is all I did today, and it all compiled, linked, and ran! Sound was missing of course, but it seems to work. I played one whole turn . But it's possible I did something else on this machine when I was putting things together for the release before.
|
|
|  |
 |
|
DDowell
|
|
Västerås, Sweden
Nov 2001 time: 06:31
|
|
I'm getting two errors when doing as Mr. Ogre suggested.
They are both concerning the video/movie section of the game.
code:
K:\CTP2S\ctp2_code\ui\aui_directx\aui_directmovie.cpp(197) : error C2065: 'UNITS' : undeclared identifier
K:\CTP2S\ctp2_code\ui\aui_directx\aui_directmovie.cpp(197) : error C2065: 'MILLISECONDS' : undeclared identifier
Did you (Ogre) define those yourself (and if so, what values did you use) or how did you do away with them?
|
|
|  |
 |
|
DDowell
|
|
Västerås, Sweden
Nov 2001 time: 06:31
|
|
Well, I fix that problem (UNITS/MILLISECONDS) but
now I get a link error.
code:
display.obj : error LNK2001: unresolved external symbol _xGetSystemMetrics@4
display.obj : error LNK2001: unresolved external symbol _xGetMonitorInfo@8
Any suggestions to why the linking fails?
GetSystemMetrics are defined "in" winuser.h which is included in windows.h
|
|
|  |
 |
|
DDowell
|
|
Västerås, Sweden
Nov 2001 time: 06:31
|
|
quote: Originally posted by J Bytheway
I foolishly increased the warning level to 4, just as an experiment, and saw thousands of warnings (I later discovered that it was 51822...), so I decided that this was a bad idea and reduced it to level 3 again. Unfortunately, this has had no effect, and I'm still seeing level 4 warnings no matter what I do, even if I replace the project file with the original one from the source distribution... |
I also fiddled around with the warnings a bit. But my target was to remove them altogether in order to get to the errors fasters 
Have you checked the project settings carefully? Any /WX must be replaced/removed (exchange X for 0,1,2,3.. depending on warning level).
You say you cant get around it by replacing the .dsw? That's strange. 
|
|
|  |
 |
|  |
All times are GMT. The time now is 05:31. Apolyton Time is 00:31. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|