Announcement

Collapse
No announcement yet.

COMPILE: Getting the source to compile on VS.NET

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

  • #31
    Any further attempt to compile in VC++ .NET?

    Comment


    • #32
      I tried compiling this on with VC++ 7.1 but I keep getting errors. Even in the standard headers.

      I'm confused about the list header. What am I supposed to replace it with?

      Maybe I should try again when I'm less tired

      Comment


      • #33
        Isn't there a utility that updates older code created in VC++ 6.0 in the VC++ .NET? I think they supposed to have such a tool but since I don't have VC++ .NET I can't be sure.

        Comment


        • #34
          I keep getting errors about too few template arguments like this:
          c:\devel\ctp2\ctp2_code\ai\list-fixed(59): error C2976: 'std::_Bidit' : too few template arguments

          After some googling I discovered it appears to be a bug in the VC++ 7.1 compiler.

          Does anyone know if there's a workaround?

          Comment


          • #35
            Did you search for an update on Microsoft's pages? Maybe you should try to get an earlier version of MS VC++ of course for free.

            Other than that I cannot give more usefull advice as I use VC++ 6.0.

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

            Comment


            • #36
              In case you don't know:

              For information and downloads regarding visual studio .net visit: http://msdn.microsoft.com/vstudio/default.aspx
              For support: http://support.microsoft.com/default...fh;en-us;vsnet

              More links in Microsoft's site.
              If you find no answer to the problem in question simply email them.
              It might prove to be a rather simple fix after all.

              Comment


              • #37
                Hello!
                Did anyone manage to get the source code compiled on VC++ .NET 2002 or 2003?

                Comment


                • #38
                  I doupt that anyone tried it at least not publicly, so you are on your own, if you have .net then just try it of course with the lastest source files available.

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

                  Comment


                  • #39
                    OK, I played around with .NET at uni. So far I was able to compile the mapplugins, but wasn't able to compile, dbgen.exe and the debug *.exe.

                    As I don't have administrator rights I had to replace all the appearance of CDKDIR again in all the *.dsp files first, then I had to convert the VC 6 dsw file to a .NET solution, note that you have to replace the CDKDIR refferences first otherwise you still have some refferences in .NET files.

                    Then I had to add the include stuff I did what Mr Ogre suggested in the other thread:

                    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
                    You find the include places under: Tools->Options->Projects->VC++ Directories

                    I added under as first directory: Show directories for Executable file
                    Z:\RAID\CTP2\ctp2source\bin

                    That's the directory of the binaries like bison or flex.

                    Under include files:

                    Z:\RAID\CTP2\DXSDK\include
                    Z:\RAID\CTP2\DXMedia\classes\base
                    Z:\RAID\CTP2\DXMedia\include

                    The stuff for direectX and direct media.

                    And under Libary files well nothing and I thought I put there the libaries, however I copied like Mr Ogre the libary stuff.

                    And then I changed in Project->Properties->Linker->Advanced Target Machine from MachineX86 (/MACHINE:X86) to Not Set.

                    I think this should be done but so far I wasn't able to test it whether this has any effect, because I got these error messages:

                    Code:
                    ------ Build started: Project: dbgen, Configuration: Debug Win32 ------
                    
                    Performing Custom Build Step
                    "", line 1: premature EOF
                    /cygdrive/z/Raid/CTP2/ctp2source/bin/flex: could not create z:\Raid\Ctp2\ctp2source\ctp2_code\gs\dbgen"lex.yy.c z:RaidCtp2ctp2sourcectp2_codegsdbgenctpdb.l
                    Project : error PRJ0019: A tool returned an error code from "Performing Custom Build Step"
                    
                    Build log was saved at "file://z:\Raid\Ctp2\ctp2source\ctp2_code\gs\dbgen\Debug\BuildLog.htm"
                    dbgen - 1 error(s), 0 warning(s)
                    I see that the '\' are missing in the path name but I don't know why.

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

                    Comment


                    • #40
                      Do you mean " or \ are missing? If the latter, you might try changing them to / instead.

                      Otherwise, you could just do the custom build steps by hand on a command line.

                      Comment


                      • #41
                        Actual this is the problem:

                        z:RaidCtp2ctp2sourcectp2_codegsdbgenctpdb.l

                        You see neither \ or / given this is really the filename it tried to create.

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

                        Comment


                        • #42
                          Maybe try to replace \ with \\ in custom build step command?
                          Solver, WePlayCiv Co-Administrator
                          Contact: solver-at-weplayciv-dot-com
                          I can kill you whenever I please... but not today. - The Cigarette Smoking Man

                          Comment


                          • #43
                            Judging by the "/cygdrive/z/" it's running under bash, which probably won't recogonise \ as a directory separator, which could be causing the problem...

                            Comment


                            • #44
                              How is that possible anyway, Visual Studio .NET on a machine that's running bash?
                              Solver, WePlayCiv Co-Administrator
                              Contact: solver-at-weplayciv-dot-com
                              I can kill you whenever I please... but not today. - The Cigarette Smoking Man

                              Comment


                              • #45
                                Originally posted by Solver
                                How is that possible anyway, Visual Studio .NET on a machine that's running bash?
                                Through the magic of cygwin.

                                Comment

                                Working...
                                X