Announcement

Collapse
No announcement yet.

COMPILE: Linux Port

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

  • #16
    Good Job

    3 comments from me right now:

    1. in the Makefile:
    Code:
    -mkdir dll
    -mkdir dll/map
    should be replaced by
    Code:
    -mkdir -p dll
    -mkdir -p dll/map
    (It isnt serious, just suppresses the warnings if the directories already exist)

    2. What byacc are you using? Mine wouldnt accept the -o option. I had to remove it and copy the files manually.

    3. There should be a variable like WINE_INCLUDE_DIR (or something like that) in the Makefile, pointing to the include dir of the winelib, because then it would be easier to change the Path of the winelib include files.

    Comment


    • #17
      And they are really allowed to call this "C++ Code"? I cant believe the VC++ compiler is accepting this. The Header files are a real mess. To get this working declarations have to be taken from one file and put into another, because header files are needing declarations from each other...

      Well i managed to correct some errors (especially the "enum"-Errors) but now i am stuck with structure (?) called MouseEventCallback. It is used as a type, but i cant find a declaration of it and so g++ complains. Anybody got an idea where the declaration is / how to solve that?
      Last edited by uppi; November 4, 2003, 20:20.

      Comment


      • #18
        Originally posted by uppi
        And they are really allowed to call this "C++ Code"? I cant believe the VC++ compiler is accepting this. The Header files are a real mess. To get this working declarations have to be taken from one file and put into another, because header files are needing declarations from each other...

        Well i managed to correct some errors (especially the "enum"-Errors) but now i am stuck with structure (?) called MouseEventCallback. It is used as a type, but i cant find a declaration of it and so g++ complains. Anybody got an idea where the declaration is / how to solve that?
        I guess VC++ lets you typedef a function signature and then use it to declare function prototypes. MouseEventCallback is an example of this.

        eg.

        typedef void (*MouseEventCallback)( aui_MouseEvent *mouseData );

        virtual MouseEventCallback PreChildrenCallback {}

        The traditional way to do this is

        virtual void PreChildrenCallback( aui_MouseEvent *mouseData ) {}

        Have a look at ui/aui_common/aui_region.h line 354 of my patched version.

        This is what is happening that causes the enum problems

        header a.h
        ------------
        #include "b.h"

        enum a1 {
        a1_a,
        a1_b,
        a1_c
        };

        class a2 {
        b1_a var;
        .....
        };

        --------------

        header b.h
        -------------
        #include "a.h"

        enum b1 {
        b1_a,
        b1_b,
        b1_c
        };

        class b2 {
        a1_a var;
        .....
        };
        ---------------

        So basically there are circular dependencies. I think the easiest way to fix this is to place the #include "a.h" after the enum is declared.

        GENDER and CIV_INDEX are two good examples of this.

        Mike

        Comment


        • #19
          thanks

          Now I managed to compile all the files in ctp/ctp2_utils

          Comment


          • #20
            I got the executable to build with SDL/SDL_mixer instead of mss32, and sound (at least the sfx) seem to work fine. The only thing I couldn't do a direct mapping of was cdrom volume. I couldn't find a way in SDL to adjust the cdrom volume.

            Comment


            • #21
              Nice work

              I don't know how the SDL audio subsystem works, but your efforts are much appreciated.

              Comment


              • #22
                Its great... If we can get some linux people involved... well... the more the merrier.

                Comment


                • #23
                  Originally posted by bfennema
                  I got the executable to build with SDL/SDL_mixer instead of mss32, and sound (at least the sfx) seem to work fine. The only thing I couldn't do a direct mapping of was cdrom volume. I couldn't find a way in SDL to adjust the cdrom volume.
                  Great work! Yea, I'm surprised that more game companies don't use sdl or openal instead of mss.

                  Is this under windows or linux? If it's under linux then my hats off to you for fixing all the annoying compiler problems so quickly!

                  Mike

                  Comment


                  • #24
                    Does anyone know how to get g++ to grok the following?

                    file: a.h
                    -----------------
                    #ifndef A_H
                    #define A_H

                    #include "b.h"

                    class a {
                    b m_b;
                    };
                    #else
                    class a;
                    #endif
                    -----------------
                    file: b.h
                    -----------------
                    #ifndef B_H
                    #define B_H

                    #include "a.h"

                    class b {
                    a m_a;
                    };

                    #else
                    class b;
                    #endif
                    -----------------
                    file: tmp.cc
                    -----------------
                    #include "a.h"
                    #include "b.h"

                    int main() {
                    a a_var;
                    return 0;
                    }
                    -----------------

                    Mike

                    Comment


                    • #25
                      Originally posted by bfennema
                      I got the executable to build with SDL/SDL_mixer instead of mss32, and sound (at least the sfx) seem to work fine. The only thing I couldn't do a direct mapping of was cdrom volume. I couldn't find a way in SDL to adjust the cdrom volume.
                      Could you please zip up the changed files and post them here?

                      kaan

                      Comment


                      • #26
                        Originally posted by closms
                        Does anyone know how to get g++ to grok the following?

                        (snip)
                        No c++ compiler should accept that piece of code. Basically class a contains class b, and class b contains class a, which leads to an infinite regress. Depending on what you really want to achieve with that piece of code, you could

                        1) replace m_a and m_b with pointers and use forward declarations instead of including the headers, or

                        2) declare a common base class for both of them which contains the data you want shared.

                        Comment


                        • #27
                          Or, perhaps better, post a diff against the original source.

                          So long as it doesn't break anything, a linux-buildable source would be an excellent starting place for everyone else's modifications, as it's much more likely to remain portable/cross-platform.

                          Comment


                          • #28
                            Originally posted by Leland

                            No c++ compiler should accept that piece of code. Basically class a contains class b, and class b contains class a, which leads to an infinite regress. Depending on what you really want to achieve with that piece of code, you could

                            1) replace m_a and m_b with pointers and use forward declarations instead of including the headers, or

                            2) declare a common base class for both of them which contains the data you want shared.
                            Actually there were no circular dependencies in the classes itself, but in the header files containing the various enums. By putting these enums in a seperate header file this is (more or less) easily solved.

                            Comment


                            • #29
                              Originally posted by uppi

                              Actually there were no circular dependencies in the classes itself, but in the header files containing the various enums. By putting these enums in a seperate header file this is (more or less) easily solved.
                              Actually I was talking about closms' code.

                              Comment


                              • #30
                                robotcom

                                Does anyone know what the code in this subdir of for? I find a lot of duplicate headers in here. And including them has been nothing but trouble (im working on getting all the ui code to compile).

                                Comment

                                Working...
                                X