Bugs and Problems

Issues with 1.68C

See also the remarks for previous versions.


wxTextWindow and Gnu-Win32/Mingw32

The ostream-compatibility of wxTextWindow appears not to work with Gnu-Win32/Mingw32.

utils/image compilation problem

If you get this message:

In file included from wx_image.h:36,
                 from wx_image.cpp:37:
wx_imgx.h:53: conflicting types for `char * sys_errlist[]'
/usr/include/stdio.h:221: previous declaration as `const char *const const sys_errlist[]'
remove line 53 in wx_imgx.h.


Issues with 1.68B

See also the remarks for previous versions.


Print preview problems on Windows

1.68 has a new method for displaying the preview, which eliminates the need for a large bitmap to be created (this can fail for high zoom factors).

Unfortunately for some applications, this method can cause slow scrolling. You may wish to change USE\_BITMAP\_PREVIEW to 1 in include/base/wx_print.h to re-enable the old method.

VC++ using .nt makefiles: Salloc, _nilStrRep, Compare are undefined

In the 1.68B distribution, the makefile.nt in src/msw has a mismatched setting compared with those set by default in wx_setup.h.

wx_setup.h by default sets "#define USE_GNU_WXSTRING 1", but the makefile.nt in src/msw sets "USE_GNU_WXSTRING=0". For all the samples etc. to compile, change the makefile.nt to set this value to 1, clean the object files ('cleanall' target), and recompile.


Issues with 1.67

Here are some common problems users may experience with the current release, with workarounds.

Download patch2.zip for fixes to most of these problems (except the Fafa one). Unzip with the -a option to convert DOS filenames to Unix.

Problems compiling wb_list.cpp with gcc

If you get this kind of message:
wb_list.cpp: In method `wxList::wxList(wxObject * ...)':
wb_list.cpp:178: `__builtin_va_alist' undeclared (first use this function)
wb_list.cpp:178: (Each undeclared identifier is reported only once
wb_list.cpp:178: for each function it appears in.)
wb_list.cpp:186: warning: implicit declaration of function `int __builtin_va_arg_incr(...)'
try editing the makefile and setting your OPTIONS (XView/Motif) or FLAGS (Xt) as follows:
FLAGS = -O2 -D__EXTENSIONS__ -Dsparc -Dlint -DSVR4 -Wall -Dwx_xt # (or -Dwx_motif for Motif)
for Solaris; for other systems, -D__EXTENSIONS__ is (presumably?) the relevant flag that helps.

Undefined virtual table error

If you get something like this:
 ld: Undefined symbol 
    wxView virtual table
    wxCommand virtual table
    wxFileHistory virtual table
    ...
when compiling with g++, it could be that the relevant file (here, src/base/wx_doc.cpp) is in DOS CR/LF format. Remove the extra characters with a dos2unix utility, or by zipping up the file and unzipping with the -a option, or by using a text editor, and recompile.

Under Motif, submenus in popup menus don't call back.

In src/x/wx_menu.cpp, comment out the line :

and recompile.

Windows 95 OEM2/Fafa library problem

See item in 'Issues with 1.66F' below. This is cured in wxWidgets 2 by eliminating the Fafa library. Meanwhile, if this is a major problem, the wxWin 2 solution can be brought forward into a minor release.

Linux and SWiM Motif 2.0

If you get unresolved references such as:
Shell.o(.text+0x2ba0): undefined reference to `SmcModifyCallbacks'

you may need to add /usr/X11R6/lib to your XLIB variable in src/make.env.

Link errors with VC++ 4.2

You need to edit src/ntwxwin.mak. Remove /NODEFAULTLIB from WINLINKFLAGS, and remove libc.lib from WINLIBS.

Missing utils/wximage/jpeg

This directory is missing (needed if compiling wxImage or wxWeb). Copy the JPEG source from an older wxWidgets distribution, or set wxImage to not use JPEG, or retrieve the JPEG source from an ftp site, or download patch2.zip (see above).

Problem compiling wx_canvs.cpp under XView

In wxCanvasRepaintProc, change the offending 'rects' variable to 'xrects'.

In AdjustScrollbars, place #ifdef wx_motif after the opening brace and #endif before the closing brace.

Problem compiling wxWeb source

On IRIX62 ver 6.2 with CC 7.1, wx-1.67 broke at utils/wxweb/src (htmltabl.cpp, http.cpp, simsock.cpp). The following fixes it.


=============================patch================================
*** htmltabl.cpp.orig Tue Jul 29 15:32:29 1997
--- htmltabl.cpp Tue Jul 29 15:40:56 1997
***************
*** 33,43 ****
  #include "htmlpars.h"
  #include "htmltabl.h"

! const float DEFAULT_BORDER_WIDTH = 1.0F;
! const float DEFAULT_CELL_SPACING = 2.0F;
! const float DEFAULT_CELL_PADDING = 1.0F;
! const float EXTRA_X_SPACING = 2.0F;
! const float EXTRA_Y_SPACING = 4.0F;

  ListOf table_list;

--- 33,43 ----
  #include "htmlpars.h"
  #include "htmltabl.h"

! extern const float DEFAULT_BORDER_WIDTH = 1.0F;
! extern const float DEFAULT_CELL_SPACING = 2.0F;
! extern const float DEFAULT_CELL_PADDING = 1.0F;
! extern const float EXTRA_X_SPACING = 2.0F;
! extern const float EXTRA_Y_SPACING = 4.0F;

  ListOf table_list;

*** http.cpp.orig Tue Jul 29 15:18:19 1997
--- http.cpp Tue Jul 29 15:20:15 1997
***************
*** 838,844 ****
      citem->secure = 0;

      string a, v;
!     char* ptr = rest;

      while (GetAttributeValuePair(ptr, a, v))
      {
--- 838,844 ----
      citem->secure = 0;

      string a, v;
!     const char* ptr = rest;

      while (GetAttributeValuePair(ptr, a, v))
      {
*** simsock.cpp.orig Tue Jul 29 15:14:18 1997
--- simsock.cpp Tue Jul 29 15:15:01 1997
***************
*** 193,199 ****
  #endif
  #endif

!   act.sa_handler = (void (*)(... )) SIG_IGN;
    act.sa_flags = 0;
    sigaction(SIGPIPE, &act, 0);
   }
--- 193,199 ----
  #endif
  #endif

!   act.sa_handler = (void (*)(int )) SIG_IGN;
    act.sa_flags = 0;
    sigaction(SIGPIPE, &act, 0);
   }

Menus popping up at the wrong place

Popup-menus can pop up on the wrong window in Motif. To fix this, edit the PopupMenu function in src/x/wx_win.cpp at line 735, and comment out or delete these two lines:



Issues with 1.66F

Resource files syntax error

Some of the Windows resource files (.rc) for samples and utilities have syntax errors - paths enclosed in strings should have double backslashes, not single ones.

wx_canvs.cpp problem

This affects the Motif port. 1.66F has missing brackets around some macro definitions in src/x/wx_canvs.cpp. Please remove the three event_..._is_down... macros near the top of the file and replace with the following:
  
  
  

wx_utils.cpp pragma problem

This affects UNIX XView and Motif compilation. The compiler gives something like:
wx_utils.cpp:36: invalid `#pragma implementation'
wx_utils.cpp:39: invalid #-line
You need to put quotation marks around the filename in the #pragma implementation line src/x/wx_utils.cpp.

Font bug

XView and Motif ports have a problem where the font system causes segmentation violations. Please replace functions in src/base/wb_gdi.cpp with the following code:
char *wxFontNameDirectory::GetScreenName(int fontid, int weight, int style)
{
  wxFontNameItem *item = (wxFontNameItem *)table->Get(fontid);
  
  if (!item)
    return NULL;

  weight = WCoordinate(weight);
  style = SCoordinate(style);
  
  
  if (!item->screen.map[weight][style])
    item->screen.Initialize(item->name, "Screen", weight, style);

  return item->screen.map[weight][style];
}

char *wxFontNameDirectory::GetPostScriptName(int fontid, int weight, int style)
{
  wxFontNameItem *item = (wxFontNameItem *)table->Get(fontid);

  if (!item)
    return NULL;

  weight = WCoordinate(weight);
  style = SCoordinate(style);
  
  
  if (!item->printing.map[weight][style])
    item->printing.Initialize(item->name, "PostScript", weight, style);

  return item->printing.map[weight][style];
}

char *wxFontNameDirectory::GetAFMName(int fontid, int weight, int style)
{
  wxFontNameItem *item = (wxFontNameItem *)table->Get(fontid);

  if (!item)
    return NULL;

  weight = WCoordinate(weight);
  style = SCoordinate(style);
  
  
  if (!item->afm.map[weight][style])
    item->afm.Initialize(item->name, "Afm", weight, style);

  return item->afm.map[weight][style];
}

Crash in wxPanel::AttachWidget

With some versions of Motif, e.g. SWiM for Linux, there's a crash in this function (the second AttachWidget in wx_panel.cpp, whose first argument is wxWindow *item), if USE_GADGETS is 1 in wx_setup.h. Either set USE_GADGETS to 0, or comment out the second XtAddEventHandler call. This will cause Dialog Editor and wxBuilder to have insensitive labels.

Compilation with VC++ 4.2

The compilation problems are, I believe, cured by replacing all occurrences of

#include <iostream>
with
#include <iostream.h>

My mistake was mix these different kinds of #include. See also the next paragraph.

Compilation with VC++ 5.0

Some or all of the following may also apply to compiling with VC++ 4.2.

Volker Flvder (volker.floeder@hamburg.netsurf.de) has sent me the changes he made to 1.66F to get it compiled with VC++ 5.0. See the ports/msvc50 directory.

Version of CTL3D32.DLL supplied with wxWidgets out of date

You or your users may have trouble with this version. For a version which is known to work on all 32-bit Windows platforms, please download this one.

Application causes GPFs on Windows 95 exit: OEM version 2

Later OEM versions of Windows 95 don't seem to like the Fafa library that's usually compiled into wxWidgets. The symptom is that after wxWidgets applications have been run (and perhaps have closed), and when Windows is exited, a GPF is produced. The workaround is to switch off the Fafa library (FAFA_LIB = 0 in wx_setup.h) and recompile, making do without bitmapped buttons, messages, checkboxes and radioboxes.

The Fafa library will be removed from wxWidgets 2.0, and bitmap messages and buttons will be reimplemented.

Duplicate symbol error when compiling with xlC on AIX 4.1.4

It's not necessary to use "-lCns -lbsd" when linking wx applications using xlC (AIX 4.1.4).
make.env:

# AIX: -lCns -lbsd
#COMPLIBS=-lCns -lbsd
COMPLIBS=