Page 1 of 1

codelite-1.0.2527 Fails to build on Mac OS X

Posted: Fri Dec 19, 2008 7:28 am
by zarnce
I have tried to build codelite-1.0.2527 from the source tar.gz and from subversion and both fail to build.

g++ -O3 -DREGEXP_UNICODE -Wall -I/usr/local/lib/wx/include/mac-unicode-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__ -fno-strict-aliasing -DASTYLE_LIB -DYY_NEVER_INTERACTIVE=1 -DGTK -DSCI_LEXER -DLINK_LEXERS -D__WX__ -D__APPLE__ -DMACOSX -ILiteEditor -I. -I./sdk/wxsqlite3/include -I./sdk/wxsqlite3/sqlite3/include -I./sdk/wxscintilla/include -I./sdk/wxscintilla/src/scintilla/include -I./sdk/wxscintilla/src/scintilla/src -I./Interfaces -I./Debugger -I./Plugin -I./CodeLite -c Plugin/cppwordscanner.cpp -o Release_gcc_unicode/cppwordscanner.o
Plugin/cppwordscanner.cpp: In constructor ‘CppWordScanner::CppWordScanner(const wxString&)’:
Plugin/cppwordscanner.cpp:53: error: no matching function for call to ‘wxSortedArrayString::Sort()’
/usr/local/include/wx-2.8/wx/arrstr.h:27: note: candidates are: void wxBaseArrayStringBase::Sort(int (*)(wxString*, wxString*))
make: *** [Release_gcc_unicode/cppwordscanner.o] Error 1

I'm using wxWidgets 2.8.9.0

Any ideas?

Thanks
Brian

Re: codelite-1.0.2527 Fails to build on Mac OS X

Posted: Fri Dec 19, 2008 10:46 am
by eranif
zarnce wrote:I have tried to build codelite-1.0.2527 from the source tar.gz and from subversion and both fail to build.

g++ -O3 -DREGEXP_UNICODE -Wall -I/usr/local/lib/wx/include/mac-unicode-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__ -fno-strict-aliasing -DASTYLE_LIB -DYY_NEVER_INTERACTIVE=1 -DGTK -DSCI_LEXER -DLINK_LEXERS -D__WX__ -D__APPLE__ -DMACOSX -ILiteEditor -I. -I./sdk/wxsqlite3/include -I./sdk/wxsqlite3/sqlite3/include -I./sdk/wxscintilla/include -I./sdk/wxscintilla/src/scintilla/include -I./sdk/wxscintilla/src/scintilla/src -I./Interfaces -I./Debugger -I./Plugin -I./CodeLite -c Plugin/cppwordscanner.cpp -o Release_gcc_unicode/cppwordscanner.o
Plugin/cppwordscanner.cpp: In constructor ‘CppWordScanner::CppWordScanner(const wxString&)’:
Plugin/cppwordscanner.cpp:53: error: no matching function for call to ‘wxSortedArrayString::Sort()’
/usr/local/include/wx-2.8/wx/arrstr.h:27: note: candidates are: void wxBaseArrayStringBase::Sort(int (*)(wxString*, wxString*))
make: *** [Release_gcc_unicode/cppwordscanner.o] Error 1

I'm using wxWidgets 2.8.9.0

Any ideas?

Thanks
Brian
I constantly compiles codelite on mac (the latest trunk) - with no special problems.

Here is the wxArrayString declaration (which should be the same as yours...):

Code: Select all

class WXDLLIMPEXP_BASE wxArrayString : public wxArrayStringBase
{
public:
    // type of function used by wxArrayString::Sort()
    typedef int (wxCMPFUNC_CONV *CompareFunction)(const wxString& first,
                                                  const wxString& second);

    wxArrayString() { }
    wxArrayString(const wxArrayString& a) : wxArrayStringBase(a) { }
    wxArrayString(size_t sz, const wxChar** a);
    wxArrayString(size_t sz, const wxString* a);

    int Index(const wxChar* sz, bool bCase = true, bool bFromEnd = false) const;

    void Sort(bool reverseOrder = false);
    void Sort(CompareFunction function);
    void Sort(CMPFUNCwxString function) { wxArrayStringBase::Sort(function); }

    size_t Add(const wxString& string, size_t copies = 1)
    {
        wxArrayStringBase::Add(string, copies);
        return size() - copies;
    }
};
I am using wx-2.8.7

Eran

Re: codelite-1.0.2527 Fails to build on Mac OS X

Posted: Mon Dec 22, 2008 7:37 am
by zarnce
I tried to build codelite with the built in Mac wxWidgets library 2.8.4. It doesn't have the correct regex installed. How do you install wxWidgets? What configuration options are required for codelite?

Thanks
Brian

error from built in 2.8.4
g++ -g -DREGEXP_UNICODE -Wall -I/usr/lib/wx/include/mac-unicode-debug-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXDEBUG__ -D__WXMAC__ -fno-strict-aliasing -DASTYLE_LIB -DYY_NEVER_INTERACTIVE=1 -DGTK -DSCI_LEXER -DLINK_LEXERS -D__WX__ -D__APPLE__ -DMACOSX -ILiteEditor -I. -I./sdk/wxsqlite3/include -I./sdk/wxsqlite3/sqlite3/include -I./sdk/wxscintilla/include -I./sdk/wxscintilla/src/scintilla/include -I./sdk/wxscintilla/src/scintilla/src -I./Interfaces -I./Debugger -I./Plugin -I./CodeLite -c Plugin/search_thread.cpp -o Debug_gcc_unicode/search_thread.o
Plugin/search_thread.cpp: In member function ‘wxRegEx& SearchThread::GetRegex(const wxString&, bool)’:
Plugin/search_thread.cpp:102: error: ‘wxRE_ADVANCED’ was not declared in this scope
make: *** [Debug_gcc_unicode/search_thread.o] Error 1

Re: codelite-1.0.2527 Fails to build on Mac OS X

Posted: Mon Dec 22, 2008 12:55 pm
by eranif
It looks like that commit 2581 changed the default from wxRE_DEFAULT to wxRE_ADVANCED (which I guess is not available on Mac)

I modified the code to use wxRE_DEFAULT

This change is now committed in svn trunk
Eran