Compiling qt under Solaris
this information current as of qt 2.2.3

Problem:
qt compilation fails with messages similar to:

/usr/openwin/include/X11/Xlib.h: warning: ANSI C++ forbids declaration '[some X function]' with no type

Solution:
In $QTDIR/configs, edit the appropriate config file for your solaris build (this was either selected for you automatically when you ran configure or can be forced with the -platform and -shared/-static configure options).

The available solaris configs in qt 2.2.3 are:

solaris-64-shared            solaris-cc-shared
solaris-64-shared-debug      solaris-cc-shared-debug
solaris-64-static            solaris-cc-static
solaris-64-static-debug      solaris-cc-static-debug
solaris-cc-gcc-shared        solaris-g++-shared
solaris-cc-gcc-shared-debug  solaris-g++-shared-debug
solaris-cc-gcc-static        solaris-g++-static
solaris-cc-gcc-static-debug  solaris-g++-static-debug

Change the -I in SYSCONF_CXXFLAGS_X11 to -isystem.
This appears to be an issue only with gcc/g++, and gcc will not report such errors when the headers are treated as "system" headers.

Example:

SYSCONF_CXXFLAGS_X11   = -I/usr/openwin/include

becomes
SYSCONF_CXXFLAGS_X11    = -isystem/usr/openwin/include



[Back]
Page written and maintained by Shawn K. O'Shea ©2001
Page info: $Id: solaris-qt-compile.html,v 1.1 2001/01/16 22:46:59 b00ga Exp $