This topic contains 6 replies, has 0 voices, and was last updated by  parasti 11 years, 3 months ago.

  • Author
    Posts
  • #4719

    Panther30
    Participant

    Okay I have narrowed down my compiling problems with scorched (both 39.1 and 40) to wxWidgets (and also remember I am running Fedora Core 5) . I tried to compile scorched from the source code after having installed wxGTK (2.6.3) from add/remove software. Using wxwidgets this way I get a wxstring array on netdialog.cpp when I try to compile scorched v40 from the source code.

    After the first compile using this version of wxwidgets (Unicode), I uninstalled wxWidgets (2.6.3) and installed wxWidgets (2.7.0) from a TARred source. using hte –disable-unicode switch and the –with-gtk switch I compiled wxWidgets and then tried once again to recompile scorched. This time scorched would not find wxWidgets.

    I tried a second time to recompile wxwidgets with the following statement:

     ./configure  --with-gtk=2  --disable-unicode --disable-shared 

    I got wxwidgets to compile (of course) and then I tried scorched again… and got a wxStringArray error in modfiles.cpp.

    Needless to say, Scorched is still not wanting to cpmpile. Is there another flag or two I am missing in the avove codes for compiling wxWidgets that I may be missing? or is it something in the way I am configuring scorched. that code is below:

     sh autogen.sh --with-mysql 

    —Panther

    #32345

    imported_gcamp
    Participant

    Can you post the error you get in modfiles.cpp?

    #32346

    Panther30
    Participant

    Here is the error I get with modffiles.cpp


    echo './'`../engine/ModFiles.cpp
    ../engine/ModFiles.cpp: In member function ‘bool ModFiles::loadModDir(const char*, const char*, ProgressCounter*)’:
    ../engine/ModFiles.cpp:163: error: ‘class wxArrayString’ has no member named ‘GetStringArray’
    make[2]: *** [ModFiles.o] Error 1
    make[2]: Leaving directory `/home/server1/scorched/src/scorched'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/server1/scorched/src'
    make: *** [all-recursive] Error 1
    #32347

    imported_gcamp
    Participant

    Try changing the code to be this-

            // Load all files contained in this directory
    wxArrayString files;
    wxDir::GetAllFiles(wxString(modDir, wxConvUTF8), &files);
    for (int i=0; isetNewPercentage(float(i)
    / float(files.Count()) * 100.0f);

    // Get the name of the current file
    wxString &current = files.Item(i);
    #32348

    Panther30
    Participant

    Tried that. new error



    ../engine/ModFiles.cpp: In member function ‘bool ModFiles::loadModDir(const char*, const char*, ProgressCounter*)’:
    ../engine/ModFiles.cpp:163: error: expected primary-expression before ‘int’
    ../engine/ModFiles.cpp:163: error: expected `;' before ‘int’
    ../engine/ModFiles.cpp:163: error: expected primary-expression before ‘int’
    ../engine/ModFiles.cpp:163: error: expected `)' before ‘int’
    ../engine/ModFiles.cpp:163: error: expected unqualified-id before ‘>’ token
    ../engine/ModFiles.cpp:167: error: name lookup of ‘i’ changed for new ISO ‘for’ scoping
    ../engine/ModFiles.cpp:163: error: using obsolete binding at ‘i’
    ../engine/ModFiles.cpp:167: error: invalid types ‘[int]’ for array subscript
    ../engine/ModFiles.cpp: At global scope:
    ../engine/ModFiles.cpp:176: error: expected unqualified-id before ‘return’
    ../engine/ModFiles.cpp:177: error: expected declaration before ‘}’ token
    make[2]: *** [ModFiles.o] Error 1
    make[2]: Leaving directory `/home/server1/scorched/src/scorched'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/server1/scorched/src'
    make: *** [all-recursive] Error 1
    #32349

    imported_gcamp
    Participant

    I am guessing that you have made a edit error, you can get the full version here :-

    http://scorched3d.cvs.sourceforge.net/*checkout*/scorched3d/scorched/src/engine/ModFiles.cpp?revision=1.34

    #32350

    Panther30
    Participant

    new error this time in displaydialog.cpp


    echo './'`DisplayDialog.cpp
    DisplayDialog.cpp: In constructor ‘DisplayFrame::DisplayFrame()’:
    DisplayDialog.cpp:101: error: ‘wxNotebookSizer’ was not declared in this scope
    DisplayDialog.cpp:101: error: ‘nbs’ was not declared in this scope
    DisplayDialog.cpp:101: error: expected type-specifier before ‘wxNotebookSizer’
    DisplayDialog.cpp:101: error: expected `;' before ‘wxNotebookSizer’
    make[2]: *** [DisplayDialog.o] Error 1
    make[2]: Leaving directory `/home/server1/scorched/src/scorched'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/server1/scorched/src'
    make: *** [all-recursive] Error 1
    #32351

    parasti
    Participant

    Not sure if what I’m about to say isn’t complete nonsense, but try wxWidgets with the version suggested in COMPILING: 2.4.2. After a quick look at the wxWidgets docs it seems that in the > 2.4 releases wxNotebookSizer has become a deprecated class and is declared in “wx/sizer.h”. (This header isn’t included, and I’m pretty sure that including it will only lead to the next compile error because of incompatibilities. Just use the correct version.)

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.