Cygwin builds of wxWidgets

Steve Holden wrote:

Robin Dunn wrote:

Steve Holden wrote:

Technically this is a wxWidgets build problem, but as I am tryng to build wxPython I am hoping someone here can give me an idea as to what's going wrong.

I'm a little bamboozled. Having made one successful 2.8.5 wxWidgets build I cannot make another as I am getting syntax errors, typified by:

/c/Steve/Projects/wxWidgets-2.8.5/bld-cygwin/bk-deps g++ -c -o basedll_appbase.o -D__WXMSW__ -I../src/tiff -I../src/jpeg -I../src/png -I../src/regex -DwxUSE_GUI=0 -DWXMAKINGDLL_BASE -DwxUSE_BASE=1 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I/c/Steve/Projects/wxWidgets-2.8.5/bld-cygwin/lib/wx/include/msw-unicode-release-2.8 -I../include -Wall -Wundef -Wno-ctor-dtor-privacy -O2 -fno-strict-aliasing ../src/common/appbase.cpp
In file included from ../include/wx/memory.h:16,
                 from ../include/wx/object.h:20,
                 from ../include/wx/list.h:33,
                 from ../src/common/appbase.cpp:31:
../include/wx/string.h:181: error: expected init-declarator before "wxStdString"

../include/wx/string.h:181: error: expected `,' or `;' before "wxStdString"
../include/wx/string.h:714: error: expected `,' or `...' before '&' token
../include/wx/string.h:715: error: ISO C++ forbids declaration of wxStdString' with no type
../include/wx/string.h:715: error: `wxString::wxString(int)' and `wxString::wxString(int)' cannot be overloaded
../include/wx/string.h: In constructor `wxString::wxString(int)':
../include/wx/string.h:715: error: `s' undeclared (first use this function)
../include/wx/string.h:715: error: (Each undeclared identifier is reported only
once for each function it appears in.)
make: *** [basedll_appbase.o] Error 1

You can avoid using the STL and the std::string by adding --disable-stl and --disable-std_string to your configure command-line.

Thanks, that got me much further. I am currently finding out what other bits and pieces I need to eliminate by a process of trial and error - there sure are a lot of options. I've also now disabled a couple of other options, and discovered I need --without-regex. The current configure is

$ ../configure --prefix=/home/wx28/ --enable-rpath=/home/wx28 --disable-stl --disable-std_string --disable-log --without-regex

and I am currently failing to compile string.cpp:

../src/common/string.cpp: In member function `bool wxString::ToULong(long unsigned int*, int) const':
../src/common/string.cpp:1722: error: `wcstoul' undeclared (first use this function)
../src/common/string.cpp: In member function `bool wxString::ToDouble(double*) const':
../src/common/string.cpp:1759: error: `wcstod' undeclared (first use this function)
make: *** [basedll_string.o] Error 1

I presume that the required definitions are being omitted conditionally? I wish I'd recorded the options I used to configure the first time through.

Oh well, I'll get there in the end - though after I manage to build for Cygwin the packaging requirements look a little daunting if we want to mae it a standard component.

Hmm. Now when I use the following configure command:

$ ../configure --prefix=/home/wx28/ --disable-stl --disable-unicode --enable-optimise --enable-debug_flag --disable-sound --disable-precomp-headers

everything proceeds along fine until make tries to compile helpdata.cpp, when I see

/c/Steve/Projects/wxWidgets-2.8.5/bld-cygwin/bk-deps g++ -c -o htmldll_helpdata.o -D__WXMSW__ -I../src/tiff -I../src/jpeg -I../src/png -DWXUSINGDLL -DWXMAKINGDLL_HTML -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXDEBUG__ -I/c/Steve/Projects/wxWidgets-2.8.5/bld-cygwin/lib/wx/include/msw-ansi-debug-2.8 -I../include -Wall -Wundef -Wno-ctor-dtor-privacy -O2 -fno-strict-aliasing ../src/html/helpdata.cpp
In file included from ../include/wx/busyinfo.h:17,
                  from ../src/html/helpdata.cpp:31:
../include/wx/generic/busyinfo.h:28: error: `wxWindow' has not been declared
../include/wx/generic/busyinfo.h:28: error: ISO C++ forbids declaration of `parent' with no type
make: *** [htmldll_helpdata.o] Error 1

This is frustrating. I compiled it correctly once, but apparently I forgot the magic formula. Let k]me know if I need to take this to some wxWidgets list. It's getting a bit beyond me ...

regards
  Steve

···

--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden

Sorry, the dog ate my .sigline

Steve Holden wrote:

This is frustrating. I compiled it correctly once, but apparently I forgot the magic formula. Let k]me know if I need to take this to some wxWidgets list. It's getting a bit beyond me ...

Me too since I hardly ever use the cygwin or mingw compilers... Your next stop should probably be wx-users.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!