Announcement

Collapse
No announcement yet.

Foolproof way of compiling CTP2?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    I'm now getting this:
    Code:
    --------------------Configuration: ctp2 - Win32 Debug Browse--------------------
    snorkeling slic.l
    Compiling...
    lex.yy.c
    Linking...
    amstrmid.lib(strmiids.obj) : error LNK2005: _IID_IDDrawExclModeVideo already defined in strmbasd.lib(strmiids_guid390.obj)
    amstrmid.lib(strmiids.obj) : error LNK2005: _IID_IDvdGraphBuilder already defined in strmbasd.lib(strmiids_guid389.obj)
    amstrmid.lib(strmiids.obj) : error LNK2005: _IID_IDvdInfo already defined in strmbasd.lib(strmiids_guid388.obj)
    amstrmid.lib(strmiids.obj) : error LNK2005: _IID_IDvdControl already defined in strmbasd.lib(strmiids_guid387.obj)
    amstrmid.lib(strmiids.obj) : error LNK2005: _IID_IGraphBuilder already defined in strmbasd.lib(strmiids_guid337.obj)
    amstrmid.lib(strmiids.obj) : error LNK2005: _IID_IBaseFilter already defined in strmbasd.lib(strmiids_guid316.obj)
    amstrmid.lib(strmiids.obj) : error LNK2005: _IID_IMediaEventEx already defined in strmbasd.lib(strmiids_guid297.obj)
    amstrmid.lib(strmiids.obj) : error LNK2005: _IID_IMediaControl already defined in strmbasd.lib(strmiids_guid295.obj)
    amstrmid.lib(strmiids.obj) : error LNK2005: _IID_IMixerPinConfig2 already defined in strmbasd.lib(strmiids_guid188.obj)
    amstrmid.lib(strmiids.obj) : error LNK2005: _IID_IMixerPinConfig already defined in strmbasd.lib(strmiids_guid187.obj)
    amstrmid.lib(strmiids.obj) : error LNK2005: _CLSID_DvdGraphBuilder already defined in strmbasd.lib(strmiids_guid161.obj)
    amstrmid.lib(strmiids.obj) : error LNK2005: _CLSID_OverlayMixer already defined in strmbasd.lib(strmiids_guid136.obj)
    amstrmid.lib(strmiids.obj) : error LNK2005: _CLSID_FilterGraph already defined in strmbasd.lib(strmiids_guid88.obj)
    CivCTP_dbg.exe : fatal error LNK1169: one or more multiply defined symbols found
    Error executing link.exe.
    Creating browse info file...
    
    CivCTP_dbg.exe - 14 error(s), 0 warning(s)
    Caution! Under no circumstances confuse the mesh with the interleave operator, except under confusing circumstances!
    -Intercal reference manual

    People often remark of me, "You say sorry far to much!". To which my common-sense reply is "I apologise".

    Comment


    • #17
      I managed to get it to run by removing the strmiids.lib from the libraries, but now I don't know how to run it. Martin just said that you didn't need to copy accross the exe but without that I'm not sure.
      Caution! Under no circumstances confuse the mesh with the interleave operator, except under confusing circumstances!
      -Intercal reference manual

      People often remark of me, "You say sorry far to much!". To which my common-sense reply is "I apologise".

      Comment


      • #18
        Of course you don't need to copy it. You used an IDE to edit and to call the compiler and linker to create the program. Do you think it would be very confortable for the original CTP2 team to copy each time the program. Of course not. Just press inside MS Visual Studio Ctrl and F5 and the same time to start the program. And you don't even need to copy the texture.dat from the CTP2 program libary, as the debug version doesn't have the CD check.

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

        Comment


        • #19
          Whenever I start it like that, I get an error that mss32.dll was not found.
          Caution! Under no circumstances confuse the mesh with the interleave operator, except under confusing circumstances!
          -Intercal reference manual

          People often remark of me, "You say sorry far to much!". To which my common-sense reply is "I apologise".

          Comment


          • #20
            Well that's because the stripped every mss related filed from the source code, even if they are released with the original game. Just copy the file from your ..\ctp2_program\ctp\ folder to your ..\ctp2_code\ctp\ folder, and the texture.dat if you haven't already so that a final release version can find the CD.

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

            Comment


            • #21
              Yes, but then I get problems with not being able to find files. Where have you installed your ctp2 code?

              I know I'm probably sounding annoying, and if so sorry.
              Caution! Under no circumstances confuse the mesh with the interleave operator, except under confusing circumstances!
              -Intercal reference manual

              People often remark of me, "You say sorry far to much!". To which my common-sense reply is "I apologise".

              Comment


              • #22
                I installed the source code directory into the same directory as recommended in the source code readme:

                Lastly, YOU NEED THE DATA DIRECTORY FROM THE ORIGINAL SHIPPING GAME. All the graphics, sounds, and other data files needed to actually run the game are not included here. Place the ctp2_data directory from the game install directory at the same directory level as ctp2_code in this archive to run an executable built from DevStudio.
                For me that means ctp2_program and ctp2_data have the following paths:

                C:\Activision\CTP2\ctp2_data\
                C:\Activision\CTP2\ctp2_program\

                And the source code directory is:

                C:\Activision\CTP2\ctp2_code\

                And if you have an English version of CTP2 you are done, if you don't have an English version of CTP2 you need to edit the civpath.txt in your ..\ctp2_code\ctp\ folder and replace in the fourth line english with the language subfolder name of your CTP2 version for me it would be german.

                Of course alternativly you just could replace the civpath.txt in the source directory by the one in the program directory.

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

                Comment


                • #23
                  I noticed that the 'preferred' compiler is Microsoft Visual Studio 6.

                  Nt really being a C++ code-cutter myself I went Net-browsing. There's an interesting site (www.thefreecountry.com) which has all sorts of freeware. Anybody out there used the site or heard anything +/- about it?

                  Anyway, they're offering 3 free compilers
                  Microsoft Visual C++ 2005 Beta
                  Microsoft eMbedded Visual C++
                  Microsoft Visual C++
                  Are these usable?

                  Txs in adv

                  Comment


                  • #24
                    I didn't test them, but those versions contain only the compiler and the linker. The CTP2 project comes with a lot of options passed on the command line to these *.exe's. Obviously you have to study the project files first, to figure out how you can make the program compile without the IDE.

                    Alternatively you can trial to make it compile on another compiler.

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

                    Comment


                    • #25
                      Txs for the reply, Martin.
                      Unfortunately it leaves me more confused than ever (have no idea what IDE is).

                      Although I have 20+ years IT experience I've never used C++ (had a 1 week course of Stratus C many years ago but the C project was dropped so I didn't get to use the knowledge).

                      Professionally it's been COBOL and similar in mainframe environments. I taught myself Turbo Pascal a few years back in order to help my eldest through her University course.

                      So what I want to do now is teach myself C++. MS Visual Studio seems to be quite popular. But Net-browsing showed up an awful lot of different varieties. I'm guessing that I don't want anything to do with "Enterprise" version as these seem to be for multi-coder use. I'm also guessing that ".NET" is part of the product name as nearly all of the offerings mention it.

                      Over the years I've done a lot of bug-fix/maintenance work and, weird though it sounds, I actually enjoy wandering around code to find out how it works (or doesn't in the case of bugs). And I really would like to be able to contribute more to the SCP.

                      So if you, or anyone else (hi, guys), could point me towards the right product to aquire I'd be eternally (well, maybe not that long a time) grateful. Like, compared to you lot I'm a C++ babe in arms.

                      Txs for your patience, I'll try not to tax it too much.

                      Comment


                      • #26
                        IDE: Integrated Developement Environment

                        Basicly it is a program that combines an editor, to edit the source files, a compiler, to compile each single C++ source file into an object file, a linker to link all the object files into a program, a debugger, and maybe more components I have forgotten.

                        Compiler and linker are seperate programs, that means you can take Visual Studio 6 and plug in the compiler and linker from Visual Studio .NET. Since Visual Studio passes a lot of command line parameters to the compiler and probably the compiler's name is hardencoded you cannot take a non MS compiler for replacement.

                        However considering the fact that Microsoft only offers the compiler and the linker for free but not IDE the more important consequence is that you have to figure out those command line options and all the other stuff so that the compiler knows in which directory a certain file can be found. Probably this would be a batch file, but of course a lot of work. Of course this is not impossible but a I think this is a lot of work. One possibility to get hold on Visual Studio 6 or Visual Studio .Net is ebay, of course you have to know how much it should cost.

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

                        Comment


                        • #27
                          I´ve built all .dll files successfully, but haven´t yet being able to build the cpt2 executable. It´s horrible the amount of time it takes to try to build this ...

                          I used the latest compilation of altered source files, and got this:

                          --------------------Configuration: ctp2 - Win32 Release--------------------
                          Compiling...
                          debug.c
                          Generating Code...
                          Compiling...
                          debugassert.cpp
                          debugcallstack.cpp
                          debugexception.cpp
                          debugmemory.cpp
                          log.cpp
                          Generating Code...
                          Compiling...
                          Endecode.c
                          Shroud.c
                          Verify.c
                          Generating Code...
                          Compiling...
                          WldGen.cpp
                          Generating Code...
                          Compiling...
                          lex.sc.c
                          lex.yy.c
                          sc.tab.c
                          y.tab.c
                          lex.dbl.c
                          ldl.tab.c
                          Generating Code...
                          Compiling...
                          ldl_attr.cpp
                          ldl_data.cpp
                          ldl_data_info.cpp
                          ldl_file.cpp
                          ldl_memmap.cpp
                          Generating Code...
                          Compiling...
                          lex.ldl.c
                          Generating Code...
                          Compiling...
                          netfunc.cpp
                          Generating Code...
                          Compiling...
                          BattleViewActor.cpp
                          TiledMap.cpp
                          tiledraw.cpp
                          StrDB.cpp
                          ArmyEvent.cpp
                          Player.cpp
                          Unit.cpp
                          UnseenCell.cpp
                          SlicBuiltin.cpp
                          UnitAstar.cpp
                          aui_bitmapfont.cpp
                          keypress.cpp
                          SelItem.cpp
                          StatusBar.cpp
                          dipwizard.cpp
                          editqueue.cpp
                          messagelist.cpp
                          BattleEvent.cpp
                          BattleView.cpp
                          Generating Code...
                          Compiling...
                          radarmap.cpp
                          C:\Jogos\ctp2\ctp2_code\ui\aui_ctp2\radarmap.cpp(6 39) : error C2511: 'RadarTileBorderColor' : overloaded member function 'unsigned short (const class MapPoint &)' not found in 'RadarMap'
                          C:\Jogos\ctp2\ctp2_code\ui\aui_ctp2\radarmap.h(62) : see declaration of 'RadarMap'
                          C:\Jogos\ctp2\ctp2_code\ui\aui_ctp2\radarmap.cpp(1 058) : error C2660: 'RadarTileBorderColor' : function does not take 1 parameters
                          Scheduler.cpp
                          C:\Jogos\ctp2\ctp2_code\ai\strategy\Scheduler\Sche duler.cpp(367) : error C2065: 'm_AllIsExplored' : undeclared identifier
                          Generating Code...
                          Error executing cl.exe.

                          ctp2r.exe - 3 error(s), 0 warning(s)

                          Comment


                          • #28
                            Read this post and a few preceeding posts and you should know what to do.

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

                            Comment


                            • #29
                              Thanks! That was the problem!

                              Unfortunatly, now it shows some new errors:

                              --------------------Configuration: ctp2 - Win32 Release--------------------
                              Linking...
                              vidplay.obj : error LNK2001: unresolved external symbol _IID_IDDrawExclModeVideo
                              vidplay.obj : error LNK2001: unresolved external symbol _IID_IMixerPinConfig2
                              ctp2r.exe : fatal error LNK1120: 2 unresolved externals
                              Error executing link.exe.

                              I have already downloaded the directX 9 sdk and DIrectMedia 6 and put all include and libs dirs in the search path, but I just can´t find this two Interfaces in the sdk.

                              I thought of comenting this code .... but I think that it could be important, because it´s video related.

                              Any other ideas?

                              Thanks

                              Comment


                              • #30
                                found the interfaces in DirectMedia file strmif.h

                                .....
                                /****************************************
                                * Generated header for interface: IDDrawExclModeVideo
                                * at Wed Sep 02 02:02:08 1998
                                * using MIDL 3.02.88
                                ****************************************/
                                /* [unique][uuid][local][object] */



                                EXTERN_C const IID IID_IDDrawExclModeVideo;

                                #if defined(__cplusplus) && !defined(CINTERFACE)

                                interface DECLSPEC_UUID("153ACC21-D83B-11d1-82BF-00A0C9696C8F")
                                IDDrawExclModeVideo : public IUnknown
                                {
                                public:
                                .........

                                I have no idea what the compiler is complaining about since the interface is correctly declarated.

                                Anyone knows what EXTERN_C means??? I will have to remember c++ .... I´m just too used with pascal.

                                Comment

                                Working...
                                X