Rebuilding After Updating wxWidgets Files

team bbl


Changes to Source or Header Files

There may be times that you change the wxWidgets sources, perhaps to apply some code that fixes a bug or adds a new feature that you need. If you change only source files, you can simply rebuild the library using the same commands used to build it originally. However, if you are rebuilding after changing header files, you may need to do some additional cleaning in order for wxWidgets to build correctly due to precompiled headers that may not be automatically updated to reflect the latest changes to the header files.

  • Microsoft Visual Studio: After changing header files, you will want to rebuild the library rather than just build it, forcing any precompiled headers to be discarded and re-created.

  • GCC or MinGW using configure: Remove the .deps directory before rebuilding. This one is easy to miss because the ls command does not list the directory by default.

If you continue to receive errors that indicate that an old header file is being used (for example, the compiler can't find a function that was just added and that did not exist the first time you built wxWidgets), you may need to completely remove the build directory and rebuild the library. The build directories should not contain anything besides object files and compiled library files, so you won't lose any data related to your projects.

Changes to setup.h on Windows

Whenever you change the common setup.h (in include/wx/msw), it is very important that it be properly copied to its installed location in the lib subdirectory. If the setup.h being used to build your applications is out of sync with the setup.h used to compile the library, you will almost certainly receive link errors due to missing symbols. Although not hard to do, it is an easy step to overlook. If you are using configure and make under MSYS or MinGW, you can re-run configure. Otherwise, you will need to delete all of the setup.h files for each library build configuration in the lib subdirectory. Because the whole library needs to be rebuilt anyway, it is just as easy to delete the entire XX_lib or XX_dll directory.

    team bbl



    Cross-Platform GUI Programming with wxWidgets
    Cross-Platform GUI Programming with wxWidgets
    ISBN: 0131473816
    EAN: 2147483647
    Year: 2005
    Pages: 262

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net