[ wxwindows-Bugs-1710936 ] Incorrect info in wxStandardPaths documentation

SourceForge.net noreply at sourceforge.net
Tue May 1 19:35:47 PDT 2007


Bugs item #1710936, was opened at 2007-05-01 22:35
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1710936&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: Platform specific
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Robert Schipper (rvs)
Assigned to: Nobody/Anonymous (nobody)
Summary: Incorrect info in wxStandardPaths documentation

Initial Comment:
Documentation of wxStandardPaths::SetInstallPrefix states: "Usually the prefix is set during program configuration if using GNU autotools and so it is enough to pass its value defined in config.h to this function."

Problem is that when using GNU autotools the value of the prefix is NOT defined in config.h. The reason is, that the user of the package is free to override the prefix value on the command line of 'make', which would make the definition in config.h invalid. This behavior is mandated by the GNU coding standards, which require that, if the user changes the prefix value in the 'make' run (as opposed to the 'make install' run) the package, if needed, "shall hard code dependencies corresponding to the make-specified prefix."

The canonical way to pass this value is therefore to add '-DINSTALL_PREFIX=\"$(prefix)\"' to CPPFLAGS in the Makefile.am, so that in the source code one can write something like:

#if defined __UNIX__ && defined INSTALL_PREFIX
    wxStandardPaths stdpaths;
    stdpaths.SetInstallPrefix(wxT(INSTALL_PREFIX));
#endif



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1710936&group_id=9863




More information about the wx-dev mailing list