Page 2 of 11 FirstFirst 1 2 3 4 5 ... LastLast
Results 31 to 60 of 308

Thread: COMPILE: Getting the source to compile

  1. #31
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    16:18
    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; October 29, 2003 at 18:12.

  2. #32
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    16:18
    Originally posted by vovansim
    Well, maybe I'm just pointing out the obvious, but... HMONITOR is just a windows handle for monitors, which can be used to enumerate all of the monitors connected to the system. It's just a GDI thing, so the definition should be included in windows.h, if I am not mistaken...
    Well, as I said, I found it in windef.h (which is included by windows.h, which is included by c3.h) but for some reason it's obviously not being processed properly. I don't quite understand the message in Dale's post - does it mean to copy the header files from the VC98\include directory to somewhere in the ctp2_code directory structure? If so, where?

  3. #33
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    16:18
    OK, I think I've found the problem with HMONITOR - because this is an old version in some sense it's supposed to be using the definition in multimon.h rather than windef.h. I stuck a #include <multimon.h> in the display.h (It was already included in display.cpp so that shouldn't be too drastic a step) and that seems to fix the problem.

    I've also commented out most of the code in the SoundManager class, and set it up so that the constructor always reports failure which should then disable the sound system altogether (That's what the code suggests will happen... I just hope that all the code which uses the sound manager bothers to check that it's there first...).

    I think that now my only problems are due to those undeclared base classes in the DirectX Media stuff (It causes lots of knock-on errors in vidplay.cpp).

  4. #34
    Dale
    Emperor Dale's Avatar
    Join Date
    27 Dec 2000
    Posts
    3,962
    Country
    This is Dale's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    02:18
    John, I got no idea what the stuff in my above post meant. I was just saying I found it in a google on the error.

  5. #35
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    16:18
    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)
    Attached Files Attached Files

  6. #36
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    16:18
    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/~d...h/DShowOpenCV/

    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

    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/deve...evelopment.htm

    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... )

  7. #37
    The Big Mc
    King The Big Mc's Avatar
    Join Date
    15 Oct 2001
    Location
    Of the universe / England
    Posts
    2,061
    Country
    This is The Big Mc's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    15:18
    you have done 18 the rest has done 18 (not including this one)

    which means with my post your wrong ha ha ha ha
    "Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
    The BIG MC making ctp2 a much unsafer place.
    Visit the big mc’s website

  8. #38
    Locutus
    Deity Locutus's Avatar
    Join Date
    23 Nov 1999
    Location
    De Hel van Enschede
    Posts
    11,706
    Country
    This is Locutus's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    17:18
    Let me help John a little further

    CtP2 was designed with DirectX 7, so maybe the DirectX problems can be solved by installing the DirectX 7 SDK instead of the DX9 version? I checked the MS website and they still have it available for download. I'm at work now and won't have time tonight, so can't try myself. But if someone has time, might be worth a shot...

    DirectX 7.0a SDK: http://www.microsoft.com/downloads/d...displaylang=en

    (if the link doesn't work: http://msdn.microsoft.com/downloads/ > enter 'directx sdk' as keyword and click on Go (don't press Enter, won't work!); the file should be on page 2)
    Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

  9. #39
    Martin Gühmann
    Administrator Martin Gühmann's Avatar
    Join Date
    02 Mar 2001
    Location
    Tübingen, Germany
    Posts
    7,248
    Country
    This is Martin Gühmann's Country Flag
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Local Date
    May 21, 2013
    Local Time
    17:18

    Post

    I did what Locutus suggested and installed DirectX 7.0a and DirectX Media SDK as suggested in the readme. I was able to compile the map plug ins Crater.dll, fault.dll, geometric.dll and Plasma2.dll without any problems. I wasn't able to compile the other two projects, because I don't know where I should set the CDKDIR invironment variable. It is very nice that Mr Ogre described the setup process for Windows XP/2000, but I still use Win98. So what is the equivalent of Panel->System->Environment Variables. So what is ment by Panel, does he mean the start menue?

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

  10. #40
    DDowell
    Chieftain
    Join Date
    29 Nov 2001
    Location
    Västerås, Sweden
    Posts
    42
    Country
    This is DDowell's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    16:18
    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...
    So much to do in so little time...

  11. #41
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    16:18
    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; October 30, 2003 at 15:23.

  12. #42
    Locutus
    Deity Locutus's Avatar
    Join Date
    23 Nov 1999
    Location
    De Hel van Enschede
    Posts
    11,706
    Country
    This is Locutus's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    17:18
    I *think* you need to set them up in Autoexec.bat...
    Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

  13. #43
    Martin Gühmann
    Administrator Martin Gühmann's Avatar
    Join Date
    02 Mar 2001
    Location
    Tübingen, Germany
    Posts
    7,248
    Country
    This is Martin Gühmann's Country Flag
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Local Date
    May 21, 2013
    Local Time
    17:18

    Post

    Unfortunatly I already had the idea to put:

    SET CDKDIR = C:\Activision\CTP2\bin

    into my Autoexec.bat

    I didn't find anything about "environment variable" or "Umgebungsvariable" in the windows help.

    Does anybody know how the dos command is called that could me show all defined varaibles in.

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

  14. #44
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    16:18
    Yes, just type SET to list all defined variables, or SET CDKDIR to print the current value of CDKDIR.

    If all else fails you can just substitute the value you want for all occurances of CDKDIR in the Custom Build settings - there aren't really that many of them.

    I am making further progress - I have tried shifting around the order of the include directories in order to get the right files included (because many share the same names). Unfortunately, whichever order I use I get at least some errors, but different ones in each case. I'm not sure how to handle this yet...

  15. #45
    Martin Gühmann
    Administrator Martin Gühmann's Avatar
    Join Date
    02 Mar 2001
    Location
    Tübingen, Germany
    Posts
    7,248
    Country
    This is Martin Gühmann's Country Flag
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Local Date
    May 21, 2013
    Local Time
    17:18

    Post

    SET CDKDIR prints Syntaxfehler in English syntax error. Set alone prints all the variables and CDKDIR with its supposed value is there. Fortunatly I only have to change some project file and not the source itsself.

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

  16. #46
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    16:18
    Alternatively, you could cut out the path prior to the command in the Custom Build settings, i.e. use just byacc, rather than $(CDKDIR)\byacc, and then add the place where byacc resides to your PATH.

  17. #47
    Martin Gühmann
    Administrator Martin Gühmann's Avatar
    Join Date
    02 Mar 2001
    Location
    Tübingen, Germany
    Posts
    7,248
    Country
    This is Martin Gühmann's Country Flag
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Local Date
    May 21, 2013
    Local Time
    17:18

    Post

    Well I now replaced all occurences of the path variable by the absolute path. But now it tells me that building of "C:\Activision\Ctp2\ctp2_code\GS\DBGEN\y.tab.c" failed when I try to compile the ctp2.exe. When I try to compile the ctpdb.exe it cannot open "/tmp/yacc.aa10481" and cannot find 'y.tab.h'.

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

  18. #48
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    16:18
    Creating a directory called c:\tmp for byacc to use for its temporary files should solve the latter problem, and you need to compile the ctbdb.exe before ctp2.exe, so hopefully once you've done that the first problem should go away.

  19. #49
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    16:18
    Well, in closing for today, here is my best error count to date (I think it's fairly deceptive though, there are other errors that are not being reached)
    Code:
    --------------------Configuration: ctp2 - Win32 Debug--------------------
    Compiling...
    vidplay.cpp
    c:\dx90sdk\include\control.h(165) : error C2146: syntax error : missing ';' before identifier 'OAEVENT'
    c:\dx90sdk\include\control.h(165) : fatal error C1004: unexpected end of file found
    Error executing cl.exe.
    
    CivCTP_dbg.exe - 2 error(s), 0 warning(s)
    I can get rid of these by switching to use the DirectMedia version of control.h, but then I get errors relating to the clock definitions because I need to use the DirectX version of strmif.h.

    I guess my next attack will be to try with DirectX 7.0a.

  20. #50
    Martin Gühmann
    Administrator Martin Gühmann's Avatar
    Join Date
    02 Mar 2001
    Location
    Tübingen, Germany
    Posts
    7,248
    Country
    This is Martin Gühmann's Country Flag
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Local Date
    May 21, 2013
    Local Time
    17:18
    I am down to 53 errors. Unfortunatly it starts with:

    Code:
    C:\Activision\Ctp2\ctp2_code\ctp\display.cpp(68) : error C2065: 'LPDIRECTDRAWENUMERATEEX' : nichtdeklarierter Bezeichner
    but the ideentifer should be declared in ddraw.h.

    And I get also two directX errors that causes a lot of other errors:
    Code:
    C:\DXMedia\classes\base\ctlutil.h(439) : error C2504: 'IBasicVideo2' : Basisklasse undefiniert
    C:\DXMedia\classes\base\sysclock.h(23) : error C2504: 'IAMClockAdjust' : Basisklasse undefiniert
    Well that should it be for tonight.

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

  21. #51
    Martin Gühmann
    Administrator Martin Gühmann's Avatar
    Join Date
    02 Mar 2001
    Location
    Tübingen, Germany
    Posts
    7,248
    Country
    This is Martin Gühmann's Country Flag
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Local Date
    May 21, 2013
    Local Time
    17:18

    Post

    OK I figured out how can I change in my Visuell C++ Authors Edition the project configuration. I switched to Debug and now I get:

    Code:
    --------------------Konfiguration: ctp2 - Win32 Debug--------------------
    Kompilierung läuft...
    display.cpp
    c:\activision\ctp2\ctp2_code\ctp\display.cpp(68) : error C2065: 'LPDIRECTDRAWENUMERATEEX' : nichtdeklarierter Bezeichner
    c:\activision\ctp2\ctp2_code\ctp\display.cpp(68) : error C2146: Syntaxfehler : Fehlendes ';' vor Bezeichner 'pfnEnum'
    c:\activision\ctp2\ctp2_code\ctp\display.cpp(68) : error C2065: 'pfnEnum' : nichtdeklarierter Bezeichner
    c:\activision\ctp2\ctp2_code\ctp\display.cpp(77) : error C2146: Syntaxfehler : Fehlendes ';' vor Bezeichner 'GetProcAddress'
    c:\activision\ctp2\ctp2_code\ctp\display.cpp(84) : error C2100: Zeigeroperation ungueltig
    Fehler beim Ausführen von cl.exe.
    
    CivCTP_dbg.exe - 5 Fehler, 0 Warnung(en)
    Looks like I just need a file were 'LPDIRECTDRAWENUMERATEEX' is properly defiened.

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

  22. #52
    DDowell
    Chieftain
    Join Date
    29 Nov 2001
    Location
    Västerås, Sweden
    Posts
    42
    Country
    This is DDowell's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    16:18
    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);
    So much to do in so little time...

  23. #53
    Mr Ogre
    Warlord
    Join Date
    31 Dec 1969
    Location
    Azeroth
    Posts
    154
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    15:18
    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.
    Joe Rumsey - CTP Programmer

  24. #54
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    16:18
    Thanks - the order of the include directories is what I most wanted to know...

  25. #55
    DDowell
    Chieftain
    Join Date
    29 Nov 2001
    Location
    Västerås, Sweden
    Posts
    42
    Country
    This is DDowell's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    16:18
    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?
    So much to do in so little time...

  26. #56
    DDowell
    Chieftain
    Join Date
    29 Nov 2001
    Location
    Västerås, Sweden
    Posts
    42
    Country
    This is DDowell's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    16:18
    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
    So much to do in so little time...

  27. #57
    ahenobarb
    Prince ahenobarb's Avatar
    Join Date
    26 Nov 2001
    Posts
    437
    Country
    This is ahenobarb's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    15:18
    Originally posted by DDowell
    Well, I fix that problem (UNITS/MILLISECONDS)
    How? I did some late night compiling and have been working through errors. Although I haven't come across this one (yet), it would be useful to know how to jump the hurdles ahead. Thanks in advance.

  28. #58
    J Bytheway
    Emperor J Bytheway's Avatar
    Join Date
    02 Jul 2001
    Location
    England
    Posts
    3,826
    Country
    This is J Bytheway's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    16:18
    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... Does anyone have any ideas as to what might be going on? I can't carry on like this, and the only way I can see to solve this is to totally reinstall Visual Studio, or solve all 50000 odd warnings, and that would be tiresome...

  29. #59
    DDowell
    Chieftain
    Join Date
    29 Nov 2001
    Location
    Västerås, Sweden
    Posts
    42
    Country
    This is DDowell's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    16:18
    Originally posted by ahenobarb


    How? I did some late night compiling and have been working through errors. Although I haven't come across this one (yet), it would be useful to know how to jump the hurdles ahead. Thanks in advance.
    I simply defined it as it stated in the MSDN. If it is entirely correct in as for the CTP2 source is concerned I'm not sure of.

    This is the defines (and typedefs):
    Code:
    ...
    #define NANOSECONDS 1000000000       //10^9
    ...
    #define MILLISECONDS 1000                   //10^3
    ...
    #define UNITS NANOSECONDS/100          //10^7
    ...
    Anyone got a suggestion to my link problem?
    So much to do in so little time...

  30. #60
    DDowell
    Chieftain
    Join Date
    29 Nov 2001
    Location
    Västerås, Sweden
    Posts
    42
    Country
    This is DDowell's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 21, 2013
    Local Time
    16:18
    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.
    So much to do in so little time...

Page 2 of 11 FirstFirst 1 2 3 4 5 ... LastLast

Similar Threads

  1. HELP needed to compile the SDK
    By Thror78 in forum Civilization IV Creation
    Replies: 1
    Last Post: August 28, 2006, 18:57
  2. Compile the source code, missing headers
    By jacquipre in forum CtP2 Source Code Project
    Replies: 18
    Last Post: June 11, 2006, 10:03
  3. COMPILE: Getting the source to compile on VS.NET
    By vovan in forum CtP2 Source Code Project
    Replies: 62
    Last Post: July 8, 2004, 00:25
  4. compile fails; OS X 10.3.3
    By zbgump in forum Freeciv
    Replies: 1
    Last Post: March 18, 2004, 04:45
  5. Can't compile FreeCiv-SDL from cvs source
    By thethawav in forum Freeciv
    Replies: 3
    Last Post: March 29, 2003, 07:23

Visitors found this page by searching for:

mss32.lib

Error spawning mt.exe visual studio 2008

reftime.h no such file or directory

Project : error PRJ0003 : Error spawning mt.exe

hmonitor struct type redefinition

reftime.h missing

error LNK2001: unresolved external symbol _xGetSystemMetrics@4

IBasicVideo2 : base class undefined

knock sequence unresolved identifier

error C2065: UNITS : undeclared identifier

ogre dinput.h

error lnk2005: class ogre::controller

error prj0003 : error spawning mt.exe.

cannot open source file lex.yy.cc

Build project under Microsoft Platform SDKSamplesMultimediaDirectShowBaseClasses

error c2504: ibasicvideo2 : base class undefined

file:line:oassert

error LNK2005: localtime already defined

cannot open include file reftime.herror prj0003 : error spawning mt.exefile:fiq_drv.cline:188assert(dsp assert id:21)fatal error C1083: Cannot open include file: reftime.hunresolved external symbol _xgetmonitorinfo@8error PRJ0003 : Error spawning mt.exe VS2008c1 : fatal error c1083: cannot open source file:

Bookmarks

Posting Permissions